aboutsummaryrefslogtreecommitdiffstats
path: root/lib/protocols/Cursor.ml
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-10-12 11:58:25 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-10-12 11:58:25 -0300
commitad33454a204aa5791445e7d15f02ba0447fff85e (patch)
treeb1730a9ac5b40ff58ddc23976cd5df5dac924231 /lib/protocols/Cursor.ml
parentd4f603fa04283efe54c79b5f7664c4c9bc193857 (diff)
downloadRNT-ad33454a204aa5791445e7d15f02ba0447fff85e.tar.gz
RNT-ad33454a204aa5791445e7d15f02ba0447fff85e.zip
relation scan with enumerable and release
Diffstat (limited to 'lib/protocols/Cursor.ml')
-rw-r--r--lib/protocols/Cursor.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/protocols/Cursor.ml b/lib/protocols/Cursor.ml
index f9bd697..f53bfa1 100644
--- a/lib/protocols/Cursor.ml
+++ b/lib/protocols/Cursor.ml
@@ -39,3 +39,5 @@ let drain i ?(limit = 256) () =
if batch.exhausted then Ok tuples else loop tuples
in
loop BatFingerTree.empty
+
+let consuming cursor f = Handle.releasing cursor (fun () -> Result.bind (require cursor) f)