Module Odoc_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, 'a) result -> ('c, 'b) result
Sourceval of_option : error:'a -> 'b option -> ('b, 'a) result
Sourceval bind : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result
Sourceval (>>=) : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result