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 M.t

nullary x lifts x (a synonym to return)

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

unary f lifts f

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

binary f lifts f

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

ternary f lifts f

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

quaternary f lifts f

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

quinary f lifts f

OCaml

Innovation. Community. Security.