Options
All
  • Public
  • Public/Protected
  • All
Menu

The Functor is a type-class providing the map operation that allows lifting an f function into the functor context and applying it.

The name is short for "covariant functor".

Instances must obey these laws:

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

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

Type parameters

  • F

Hierarchy

Index

Methods

Methods

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