diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-10-12 11:58:25 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-10-12 11:58:25 -0300 |
| commit | ad33454a204aa5791445e7d15f02ba0447fff85e (patch) | |
| tree | b1730a9ac5b40ff58ddc23976cd5df5dac924231 /lib/kernel/Multigroup.ml | |
| parent | d4f603fa04283efe54c79b5f7664c4c9bc193857 (diff) | |
| download | RNT-ad33454a204aa5791445e7d15f02ba0447fff85e.tar.gz RNT-ad33454a204aa5791445e7d15f02ba0447fff85e.zip | |
relation scan with enumerable and release
Diffstat (limited to '')
| -rw-r--r-- | lib/kernel/Multigroup.ml | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/kernel/Multigroup.ml b/lib/kernel/Multigroup.ml index 9fbd386..669babb 100644 --- a/lib/kernel/Multigroup.ml +++ b/lib/kernel/Multigroup.ml @@ -192,12 +192,8 @@ module Make (S : Abstract.Storage.STORAGE) = struct if not (Concepts.Mode.exhaustible modes BatSet.String.empty) then Error (Error.unjudgeable name) else - let* enumerable = Protocols.Enumerable.require relation in - let* cursor = Protocols.Enumerable.enumerate enumerable in - Protocols.Handle.releasing cursor (fun () -> - let* scan = Protocols.Cursor.require cursor in - let* first = Protocols.Cursor.next scan in - Ok (Option.to_list (Option.map (fun witness -> name, witness) first)) ) ) ) + let* first = Protocols.Enumerable.scan relation Protocols.Cursor.next in + Ok (Option.to_list (Option.map (fun witness -> name, witness) first)) ) ) class multigroup ?bind conn value schema_tree denial_tree = object (self) |
