package middleware

  1. Overview
  2. Docs

Monads of two type parameters.

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

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

val bind : ('a, 'm) t -> ('a -> ('b, 'm) t) -> ('b, 'm) t

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

val return : 'a -> ('a, 'm) t

return a injects the value a into the monadic type.

OCaml

Innovation. Community. Security.