package middleware

  1. Overview
  2. Docs

Module Monads.IdentitySource

The identity monad, which has no special monadic behavior.

Sourcetype 'a t = 'a
Sourceval map : ('a -> 'b) -> 'a t -> 'b t

map fn a applies fn to a, producing a 'b t.

Sourceval bind : 'a t -> ('a -> 'b t) -> 'b t

bind fn a sequentially composes a with fn, passing the result of the first action to fn.

Sourceval return : 'a -> 'a t

return a injects the value a into the monadic type.