diff options
Diffstat (limited to '')
| -rw-r--r-- | lib/Utilities.ml | 3 | ||||
| -rw-r--r-- | lib/Utilities.mli | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/Utilities.ml b/lib/Utilities.ml index 0472038..939556e 100644 --- a/lib/Utilities.ml +++ b/lib/Utilities.ml @@ -90,11 +90,10 @@ module FingerTree = struct let filter_map f = BatFingerTree.fold_left (fun acc elem -> - match f elem with None -> acc | Some result -> BatFingerTree.snoc acc result) + match f elem with None -> acc | Some result -> BatFingerTree.snoc acc result ) 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 diff --git a/lib/Utilities.mli b/lib/Utilities.mli index e748693..75257af 100644 --- a/lib/Utilities.mli +++ b/lib/Utilities.mli @@ -37,7 +37,9 @@ module FingerTree : sig val join : string BatFingerTree.t -> string -> string val filter_map : ('a -> 'b option) -> 'a BatFingerTree.t -> 'b BatFingerTree.t val concat : 'a BatFingerTree.t BatFingerTree.t -> 'a BatFingerTree.t - val concat_mapm : ('a -> ('b BatFingerTree.t, 'e) result) -> 'a BatFingerTree.t -> ('b BatFingerTree.t, 'e) result + + val concat_mapm : + ('a -> ('b BatFingerTree.t, 'e) result) -> 'a BatFingerTree.t -> ('b BatFingerTree.t, 'e) result end module Fun : sig |
