diff options
Diffstat (limited to '')
| -rw-r--r-- | lib/protocols/Cursor.ml | 4 | ||||
| -rw-r--r-- | lib/protocols/Cursor.mli | 9 |
2 files changed, 3 insertions, 10 deletions
diff --git a/lib/protocols/Cursor.ml b/lib/protocols/Cursor.ml index 75dc77d..f9bd697 100644 --- a/lib/protocols/Cursor.ml +++ b/lib/protocols/Cursor.ml @@ -29,9 +29,7 @@ let rec next i = let rec exists i p = let open Utilities.Result in let* found = next i in - match found with - | None -> Ok false - | Some tuple -> if p tuple then Ok true else exists i p + match found with None -> Ok false | Some tuple -> if p tuple then Ok true else exists i p let drain i ?(limit = 256) () = let open Utilities.Result in diff --git a/lib/protocols/Cursor.mli b/lib/protocols/Cursor.mli index c977fec..ff6c027 100644 --- a/lib/protocols/Cursor.mli +++ b/lib/protocols/Cursor.mli @@ -1,6 +1,4 @@ -type batch = - {tuples: Concepts.Tuple.t BatFingerTree.t; exhausted: bool} - +type batch = {tuples: Concepts.Tuple.t BatFingerTree.t; exhausted: bool} type t class type implementation = object @@ -11,13 +9,10 @@ val make : #implementation -> Handle.protocol val from : Handle.t -> t Handle.interface option val require : Handle.t -> (t Handle.interface, Concepts.Condition.condition) result val fetch : t Handle.interface -> int -> (batch, Concepts.Condition.condition) result - val next : t Handle.interface -> (Concepts.Tuple.t option, Concepts.Condition.condition) result val exists : - t Handle.interface -> - (Concepts.Tuple.t -> bool) -> - (bool, Concepts.Condition.condition) result + t Handle.interface -> (Concepts.Tuple.t -> bool) -> (bool, Concepts.Condition.condition) result val drain : t Handle.interface -> |
