package monads

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

Monadic operators, see Monad.Syntax.S for more.

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

m >>= f is bind m f

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

m >>= f is map m ~f

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

f >=> g is fun x -> f x >>= g

val (!!) : 'a -> 'a M.t

!!x is return x

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

!$f is Lift.unary f

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

!$$f is Lift.binary f

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

!$$$f is Lift.ternary f

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

!$$$$f is Lift.quaternary f

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

!$$$$$f is Lift.quinary f

OCaml

Innovation. Community. Security.