From 66a8dfc3969f24c133a54499d0c44cf5cf52601e Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Thu, 5 Oct 2017 18:19:48 +0200 Subject: [PATCH] add a test --- src/core/CCList.ml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/CCList.ml b/src/core/CCList.ml index 4d54f0df..89dd6a80 100644 --- a/src/core/CCList.ml +++ b/src/core/CCList.ml @@ -950,6 +950,11 @@ let uniq ?(eq=(=)) l = uniq [1;1;2;2;3;4;4;2;4;1;5] |> List.sort Pervasives.compare = [1;2;3;4;5] *) +(*$Q + Q.(small_list small_int) (fun l -> \ + sort_uniq l = (uniq l |> sort Pervasives.compare)) + *) + let union ?(eq=(=)) l1 l2 = let rec union eq acc l1 l2 = match l1 with | [] -> List.rev_append acc l2