From 2a3ffd895f5c2061d7941134bb15df6047141916 Mon Sep 17 00:00:00 2001 From: Estevan Castilho Date: Thu, 30 Jul 2026 19:55:42 +0000 Subject: B-trees & serialization with bencode --- lib/Utilities.ml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/Utilities.ml') 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 -- cgit v1.2.3