diff options
| author | Estevan Castilho <tevo@riajuu.net> | 2026-10-24 03:35:20 +0000 |
|---|---|---|
| committer | Estevan Castilho <tevo@riajuu.net> | 2026-10-24 03:51:08 +0000 |
| commit | 8c2f0db7337328570af57461a3d95203537ac185 (patch) | |
| tree | df90400d4719ab5c04fb84530a8a3c0e2eae213e /lib/Utilities.ml | |
| parent | df6c0744dc4ebd164cd8a309eef5d2798b2d3e90 (diff) | |
| download | RNT-8c2f0db7337328570af57461a3d95203537ac185.tar.gz RNT-8c2f0db7337328570af57461a3d95203537ac185.zip | |
Use finger trees in more places
Diffstat (limited to 'lib/Utilities.ml')
| -rw-r--r-- | lib/Utilities.ml | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Utilities.ml b/lib/Utilities.ml index 6f27b30..0472038 100644 --- a/lib/Utilities.ml +++ b/lib/Utilities.ml @@ -93,11 +93,9 @@ module FingerTree = struct match f elem with None -> acc | Some result -> BatFingerTree.snoc acc result) BatFingerTree.empty - let concat_mapm f xs = BatFingerTree.map f xs |> sequence |> Stdlib.Result.map BatFingerTree.append - - let concat_map f = - BatFingerTree.fold_left (fun acc elem -> BatFingerTree.append acc @@ f elem) BatFingerTree.empty + let concat xss = BatFingerTree.fold_left BatFingerTree.append BatFingerTree.empty xss + let concat_mapm f xs = BatFingerTree.map f xs |> sequence |> Stdlib.Result.map concat end module Atomic = struct |
