package middleware

  1. Overview
  2. Docs

The identity monad, which has no special monadic behavior.

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

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

val 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.

val return : 'a -> 'a t

return a injects the value a into the monadic type.

OCaml

Innovation. Community. Security.