diff options
| author | Estevan Castilho <tevo@riajuu.net> | 2026-08-23 03:04:34 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-23 03:04:34 +0000 |
| commit | 07c3ad6114efe808ee595f83f29dd0c79a6f2536 (patch) | |
| tree | 0b84857ba0cbba7e4c6eb81d5e68709ca50aecb0 /lib/Utilities.mli | |
| parent | d512411992a6a2b50fcdf03689129f70f530116f (diff) | |
| download | RNT-07c3ad6114efe808ee595f83f29dd0c79a6f2536.tar.gz RNT-07c3ad6114efe808ee595f83f29dd0c79a6f2536.zip | |
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
Diffstat (limited to 'lib/Utilities.mli')
| -rw-r--r-- | lib/Utilities.mli | 12 |
1 files changed, 12 insertions, 0 deletions
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 |
