package alba

  1. Overview
  2. Docs

An applicative functor is an abstract container which is mapable and if it has functions in it the functios can be applied.

type 'a t

Type of the applicative container.

val return : 'a -> 'a t

return a makes an applicative container containing the value a.

val map : ('a -> 'b) -> 'a t -> 'b t

map f m extracts the value a from the abstract container and returns a container containing f a.

val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

f <*> m applies the function contained in f to the content of the applicative container m and injects the result into a new applicative container.