blob: f2c96a7ff564031d5528a8041ae665b08b2cf8cc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
module Result = struct
let ( let* ) = Result.bind
let fmap f m = Result.bind m f
let sequence ms =
List.fold_right
(fun m acc ->
let* acc = acc in
let* m = m in
Ok (m :: acc) )
ms (Ok [])
end
|