Module BatResult.Monad

val bind : ('a'e) t -> ('a -> ('c'e) t) -> ('c'e) 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'e) t -> ('a -> ('c'e) t) -> ('c'e) t

as bind

val return : 'a -> ('a_) t

Monadic return, just encapsulates the given value with Ok