Options
All
  • Public
  • Public/Protected
  • All
Menu

Weaker version of Applicative.

This type-class is exposed in addition to Applicative because there are data types for which we can't implement of, but that could still benefit from an ap definition. For example in case of a Map<K, ?> we couldn't define pure for it because we don't have a K key.

Must obey this law:

  1. Composition: A.ap(A.ap(A.map(f => g => x => f(g(x)), a), u), v) <-> A.ap(a, A.ap(u, v))

Equivalent with the Apply type-class in the static-land specification.

Type parameters

  • F

Hierarchy

Index

Methods

Methods

ap

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

    • A

    • B

    Parameters

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

    Returns HK<F, B>

map

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

    • A

    • B

    Parameters

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

          • a: A

          Returns B

    • fa: HK<F, A>

    Returns HK<F, B>

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