package batteries

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val bind : ('a, 'b) t -> ('a -> ('c, 'b) t) -> ('c, 'b) t

Monadic composition.

bind r f proceeds as f x if r is Ok x, or returns r if r is an error.

  • since 2.0
val (>>=) : ('a, 'b) t -> ('a -> ('c, 'b) t) -> ('c, 'b) t

as bind

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

Monadic return, just encapsulates the given value with Ok

OCaml

Innovation. Community. Security.