From 8c2f0db7337328570af57461a3d95203537ac185 Mon Sep 17 00:00:00 2001 From: Estevan Castilho Date: Sat, 24 Oct 2026 03:35:20 +0000 Subject: Use finger trees in more places --- lib/Utilities.ml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/Utilities.ml') 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 -- cgit v1.2.3