package alba

  1. Overview
  2. Docs

A functor is an abstract container which is mappable

type 'a t

Type of the abstract container containing values of type 'a.

val return : 'a -> 'a t

return a makes an abstract 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.