Options
All
  • Public
  • Public/Protected
  • All
Menu

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

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

  1. Identity: A.ap(A.of(x => x), v) <-> v
  2. Homomorphism: A.ap(A.of(f), A.of(x)) <-> A.of(f(x))
  3. Interchange: A.ap(u, A.of(y)) <-> A.ap(A.of(f => f(y)), u)
  4. Functor's map can be derived: A.map(u, f) <-> A.ap(A.of(f), u)

Type parameters

  • F

Hierarchy

Index

Constructors

constructor

Properties

F

F: Applicative<F>

Methods

applicativeHomomorphism

  • applicativeHomomorphism<A, B>(a: A, f: function): Equiv<HK<F, B>>
  • Type parameters

    • A

    • B

    Parameters

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

          • a: A

          Returns B

    Returns Equiv<HK<F, B>>

applicativeIdentity

  • applicativeIdentity<A>(fa: HK<F, A>): Equiv<HK<F, A>>

applicativeInterchange

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

    • A

    • B

    Parameters

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

    Returns Equiv<HK<F, B>>

applicativeMap

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

    • A

    • B

    Parameters

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

          • a: A

          Returns B

    Returns Equiv<HK<F, B>>

applyComposition

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

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