Stdlib320.ResultA module containing basic result operations
val is_ok : ('a, 'e) result -> boolis_ok r is
true if r = Ok xfalse if r = Error eval is_error : ('a, 'e) result -> boolis_error r is equivalent to not (is_ok e)
Mapping function for result values. It applies a function to the value of the result if the result is not an error and passes along the error otherwise. map f r is
Ok (f x) if r = Ok xError e if r = Error eMapping function for result errors, similar to the previous function but on errors, i.e. map f r is
Ok x if r = Ok xError (f e) if r = Error e