From 07c3ad6114efe808ee595f83f29dd0c79a6f2536 Mon Sep 17 00:00:00 2001 From: Estevan Castilho Date: Sun, 23 Aug 2026 03:04:34 +0000 Subject: B-tree iteration constructs (#49) * Generic `sequence`, finger tree `map2`/`zip` * `fold_left` on B-trees * Finger tree `join` * `iter`, more tests * We do not need `keys` when traversing through a trunk node --- lib/Utilities.mli | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/Utilities.mli') diff --git a/lib/Utilities.mli b/lib/Utilities.mli index cdb53df..2735009 100644 --- a/lib/Utilities.mli +++ b/lib/Utilities.mli @@ -1,5 +1,17 @@ module Result : sig val ( let* ) : ('a, 'e) result -> ('a -> ('b, 'e) result) -> ('b, 'e) result val fmap : ('a -> ('b, 'e) result) -> ('a, 'e) result -> ('b, 'e) result +end + +module List : sig val sequence : ('a, 'b) result list -> ('a list, 'b) result end + +module FingerTree : sig + val map2 : ('a -> 'b -> 'c) -> 'a BatFingerTree.t -> 'b BatFingerTree.t -> 'c BatFingerTree.t + val zip : 'a BatFingerTree.t -> 'b BatFingerTree.t -> ('a * 'b) BatFingerTree.t + + val sequence : ('a, 'b) result BatFingerTree.t -> ('a BatFingerTree.t, 'b) result + + val join : string BatFingerTree.t -> string -> string +end -- cgit v1.2.3