From 512d128918544ae1da0c808e811f3a7f177524d2 Mon Sep 17 00:00:00 2001 From: Gabriel Scherer Date: Fri, 19 Dec 2014 17:31:41 +0000 Subject: [PATCH] Add sort_uniq to ListLabels. From: Jeremy Yallop git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15684 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- stdlib/listLabels.mli | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stdlib/listLabels.mli b/stdlib/listLabels.mli index 45e3c41ea1c6..a9be40b945d9 100644 --- a/stdlib/listLabels.mli +++ b/stdlib/listLabels.mli @@ -280,6 +280,10 @@ val fast_sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list (** Same as {!List.sort} or {!List.stable_sort}, whichever is faster on typical input. *) +val sort_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list +(** Same as {!ListLabels.sort}, but also remove duplicates. + @since 4.02.0 *) + val merge : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list (** Merge two lists: Assuming that [l1] and [l2] are sorted according to the