mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
add a test
This commit is contained in:
parent
336ebe63f9
commit
66a8dfc396
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue