Module Utils.ResultMonadSource

The result type and a bind operator. This module is meant to be opened.

Sourcetype ('a, 'b) result = ('a, 'b) Result.result =
  1. | Ok of 'a
  2. | Error of 'b

Re-export for compat

Sourceval map_error : ('a -> 'b) -> ('c, 'd) result -> ('e, 'f) result
Sourceval of_option : error:'a -> 'b option -> ('c, 'd) result
Sourceval bind : ('a, 'b) result -> ('c -> ('d, 'e) result) -> ('d, 'e) result
val (>>=) : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result