From f7a2edae252affae8c9c2c8523ba4e09026dae51 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 25 May 2021 19:16:37 -0400 Subject: [PATCH] small changes related to docs of sorted_diff_uniq --- src/core/CCList.ml | 1 + src/core/CCList.mli | 2 +- src/core/CCListLabels.mli | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/CCList.ml b/src/core/CCList.ml index 85c2c2fc..5de53c1e 100644 --- a/src/core/CCList.ml +++ b/src/core/CCList.ml @@ -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 diff --git a/src/core/CCList.mli b/src/core/CCList.mli index b24b5a78..a4aaa126 100644 --- a/src/core/CCList.mli +++ b/src/core/CCList.mli @@ -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 *) diff --git a/src/core/CCListLabels.mli b/src/core/CCListLabels.mli index bca4d062..41215009 100644 --- a/src/core/CCListLabels.mli +++ b/src/core/CCListLabels.mli @@ -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 *)