Module CCResult.Infix
val (>>=) : ('a, 'err) t -> ('a -> ('b, 'err) t) -> ('b, 'err) t
Monadic composition.
e >>= f
proceeds asf x
ife
isOk x
or returnse
ife
is anError
.
val (<*>) : ('a -> 'b, 'err) t -> ('a, 'err) t -> ('b, 'err) t
a <*> b
evaluatesa
andb
, and, in case of success, returnsOk (a b)
. Otherwise, it fails, and the error ofa
is chosen over the error ofb
if both fail.
Let operators on OCaml >= 4.08.0, nothing otherwise
- since
- 2.8