mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
small changes related to docs of sorted_diff_uniq
This commit is contained in:
parent
1c6bc16362
commit
f7a2edae25
3 changed files with 3 additions and 2 deletions
|
|
@ -979,6 +979,7 @@ let sorted_diff_uniq ~cmp l1 l2 =
|
|||
|
||||
(*$T
|
||||
sorted_diff_uniq ~cmp:CCInt.compare [1; 1; 1; 2; 2; 3; 5; 8; 8; 8] [1; 2; 2; 2; 2; 8; 13; 13; 13] = [1;3;5;8]
|
||||
sorted_diff_uniq ~cmp:CCInt.compare [1;1;1;2;2] [1;2;2;2] = [1;1]
|
||||
*)
|
||||
|
||||
(*$Q
|
||||
|
|
|
|||
|
|
@ -530,7 +530,7 @@ val sorted_diff_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list
|
|||
and then remove duplicates.
|
||||
Both lists are assumed to be sorted with respect to [cmp] and
|
||||
duplicate elements in the input lists are treated individually;
|
||||
for example, [sorted_diff_uniq ~cmp [1;1;1;2;2] [1;2;2;2]] would be [[1]].
|
||||
for example, [sorted_diff_uniq ~cmp [1;1;1;2;2] [1;2;2;2]] would be [[1;1]].
|
||||
[sorted_diff_uniq ~cmp l1 l2] and [uniq_succ ~eq (sorted_diff ~cmp l1 l2)]
|
||||
always give the same result for sorted [l1] and [l2] and compatible [cmp] and [eq].
|
||||
@since NEXT_RELEASE *)
|
||||
|
|
|
|||
|
|
@ -533,7 +533,7 @@ val sorted_diff_uniq : cmp:(('a -> 'a -> int) [@keep_label]) -> 'a list -> 'a li
|
|||
and then remove duplicates.
|
||||
Both lists are assumed to be sorted with respect to [cmp] and
|
||||
duplicate elements in the input lists are treated individually;
|
||||
for example, [sorted_diff_uniq ~cmp [1;1;1;2;2] [1;2;2;2]] would be [[1]].
|
||||
for example, [sorted_diff_uniq ~cmp [1;1;1;2;2] [1;2;2;2]] would be [[1;1]].
|
||||
[sorted_diff_uniq ~cmp l1 l2] and [uniq_succ ~eq (sorted_diff ~cmp l1 l2)]
|
||||
always give the same result for sorted [l1] and [l2] and compatible [cmp] and [eq].
|
||||
@since NEXT_RELEASE *)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue