Options
All
  • Public
  • Public/Protected
  • All
Menu

Type-class laws for Functor, as defined in the funland sub-project and in the static-land spec.

Laws defined for Functor:

  1. Identity: F.map(fa, x => x) <-> fa
  2. Composition: F.map(fa, x => f(g(x))) <-> F.map(F.map(fa, g), f)

Type parameters

  • F

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

F

F: Functor<F>

Methods

composition

  • composition<A, B, C>(fa: HK<F, A>, f: function, g: function): Equiv<HK<F, C>>
  • Type parameters

    • A

    • B

    • C

    Parameters

    • fa: HK<F, A>
    • f: function
        • (a: B): C
        • Parameters

          • a: B

          Returns C

    • g: function
        • (a: A): B
        • Parameters

          • a: A

          Returns B

    Returns Equiv<HK<F, C>>

identity

  • identity<A>(fa: HK<F, A>): Equiv<HK<F, A>>
  • Type parameters

    • A

    Parameters

    • fa: HK<F, A>

    Returns Equiv<HK<F, A>>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc