add regression test for #364

This commit is contained in:
Simon Cruanes 2021-04-15 17:54:18 -04:00
parent 5611cbf7f3
commit b19cd0db5f

View file

@ -121,6 +121,10 @@ let rec _remove prefix l i =
let remove l i = _remove [] l i let remove l i = _remove [] l i
(*$= & ~printer:Q.Print.(list int)
[1;2;4] (to_list @@ remove (of_list [1;2;3;4]) 2)
*)
let rec _map_tree f t = match t with let rec _map_tree f t = match t with
| Leaf x -> Leaf (f x) | Leaf x -> Leaf (f x)
| Node (x, l, r) -> Node (f x, _map_tree f l, _map_tree f r) | Node (x, l, r) -> Node (f x, _map_tree f l, _map_tree f r)