aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Utilities.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Utilities.ml')
-rw-r--r--lib/Utilities.ml8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Utilities.ml b/lib/Utilities.ml
index bd604c9..9ae0119 100644
--- a/lib/Utilities.ml
+++ b/lib/Utilities.ml
@@ -1,4 +1,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