From cfb8e55ebab5970a30bb1a99a3b8c2c599099c88 Mon Sep 17 00:00:00 2001 From: rand00 Date: Sun, 4 Feb 2018 18:54:56 +0100 Subject: [PATCH] CCRAL: drop: Added test for bugfix. --- src/data/CCRAL.ml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/data/CCRAL.ml b/src/data/CCRAL.ml index a8e7422d..351e687b 100644 --- a/src/data/CCRAL.ml +++ b/src/data/CCRAL.ml @@ -342,6 +342,10 @@ and drop_tree_ ~size n t tail = match t with then drop_tree_ ~size:size' (n-1) l (append_tree_ r tail) else drop_tree_ ~size:size' (n-1-size') r tail +(*$T + of_list [1;2;3] |> drop 2 |> length = 1 +*) + let drop_while ~f l = let rec aux p st = match st with | St_nil -> Nil