Module BatResult.Monad

module Monad: sig .. end

val bind : ('a, 'e) BatResult.t -> ('a -> ('c, 'e) BatResult.t) -> ('c, 'e) BatResult.t

Monadic composition.

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

val (>>=) : ('a, 'e) BatResult.t -> ('a -> ('c, 'e) BatResult.t) -> ('c, 'e) BatResult.t

as bind

val return : 'a -> ('a, 'b) BatResult.t

Monadic return, just encapsulates the given value with Ok