Utils.ResultMonad
The result type and a bind operator. This module is meant to be opened.
result
type ('a, 'b) result = ('a, 'b) Result.result =
| Ok of 'a
| Error of 'b
Re-export for compat
val map_error : ('a -> 'b) -> ('c, 'a) result -> ('c, 'b) result
val of_option : error:'a -> 'b option -> ('b, 'a) result
val bind : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result
val (>>=) : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result