Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Chain inherits the laws of Apply and in addition must obey:

  1. Associativity: F.chain(g, F.chain(f, fa)) <-> F.chain(x => F.chain(g, f(x)), fa)
  2. Apply's ap can be derived: (ff, fa) => F.chain(f => F.map(f, fa), ff)

Type parameters

  • F

Hierarchy

Index

Constructors

constructor

Properties

F

F: Chain<F>

Methods

applyComposition

  • applyComposition<A, B, C>(fa: HK<F, A>, fab: HK<F, function>, fbc: HK<F, function>): Equiv<HK<F, C>>

chainAssociativity

  • chainAssociativity<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: A): HK<F, B>
        • Parameters

          • a: A

          Returns HK<F, B>

    • g: function
        • (b: B): HK<F, C>
        • Parameters

          • b: B

          Returns HK<F, C>

    Returns Equiv<HK<F, C>>

chainConsistentApply

  • chainConsistentApply<A, B>(ff: HK<F, function>, fa: HK<F, A>): Equiv<HK<F, B>>
  • Type parameters

    • A

    • B

    Parameters

    • ff: HK<F, function>
    • fa: HK<F, A>

    Returns Equiv<HK<F, B>>

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>>

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