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, 'd) result -> ('e, 'f) result
val of_option : error:'a -> 'b option -> ('c, 'd) result
val bind : ('a, 'b) result -> ('c -> ('d, 'e) result) -> ('d, 'e) result
val (>>=) : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result