CCRAL: drop: Added test for bugfix.

This commit is contained in:
rand00 2018-02-04 18:54:56 +01:00
parent 5b6b71373c
commit cfb8e55eba

View file

@ -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) then drop_tree_ ~size:size' (n-1) l (append_tree_ r tail)
else drop_tree_ ~size:size' (n-1-size') 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 drop_while ~f l =
let rec aux p st = match st with let rec aux p st = match st with
| St_nil -> Nil | St_nil -> Nil