package monads

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

These are convenient to have in scope when programming with a monad

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

t >>= f returns a computation that sequences the computations represented by two monad elements. The resulting computation first does t to yield a value v, and then runs the computation returned by f v.

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

t >>| f is t >>= (fun a -> return (f a)).

module Let_syntax : sig ... end
OCaml

Innovation. Community. Security.