From 0f5161930584eaf91fd195b891ce7d9130c7b7f1 Mon Sep 17 00:00:00 2001 From: Estevan Castilho Date: Sat, 24 Oct 2026 01:30:08 +0000 Subject: Forsake `fmap` --- lib/kernel/Prototype.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/kernel/Prototype.ml') diff --git a/lib/kernel/Prototype.ml b/lib/kernel/Prototype.ml index ea1083b..217b221 100644 --- a/lib/kernel/Prototype.ml +++ b/lib/kernel/Prototype.ml @@ -120,8 +120,9 @@ module Directory = struct method list = SI.with_read storage (Fun.flip Tree.keys node) method find k = + let open Utilities.Result in SI.with_read storage (fun tx -> Tree.lookup tx k node) - |> Utilities.Result.fmap (function + |>> (function | None -> Ok None | Some x -> constructor x |> Result.map Option.some ) end -- cgit v1.2.3