package monads

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Lifts functions into the monad.

A function that operates on values can be mapped to a function that operates on computations. We provide several liftes for common arities.

val nullary : 'a -> ('a, 'e) M.t

nullary x lifts x (a synonym to return)

val unary : ('a -> 'b) -> ('a, 'e) M.t -> ('b, 'e) M.t

unary f lifts f

val binary : ('a -> 'b -> 'c) -> ('a, 'e) M.t -> ('b, 'e) M.t -> ('c, 'e) M.t

binary f lifts f

val ternary : ('a -> 'b -> 'c -> 'd) -> ('a, 'e) M.t -> ('b, 'e) M.t -> ('c, 'e) M.t -> ('d, 'e) M.t

ternary f lifts f

val quaternary : ('a -> 'b -> 'c -> 'd -> 'e) -> ('a, 's) M.t -> ('b, 's) M.t -> ('c, 's) M.t -> ('d, 's) M.t -> ('e, 's) M.t

quaternary f lifts f

val quinary : ('a -> 'b -> 'c -> 'd -> 'e -> 'f) -> ('a, 's) M.t -> ('b, 's) M.t -> ('c, 's) M.t -> ('d, 's) M.t -> ('e, 's) M.t -> ('f, 's) M.t

quinary f lifts f

OCaml

Innovation. Community. Security.