From 28bff9b530486f2c425c7d3166a7ee3d6408fa0f Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Fri, 8 Jan 2021 11:20:48 -0500 Subject: [PATCH] doc: make it clearer the order of elements in group_by is unspecified --- src/Iter.mli | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Iter.mli b/src/Iter.mli index 182460d..973d620 100644 --- a/src/Iter.mli +++ b/src/Iter.mli @@ -296,13 +296,14 @@ val sorted : ?cmp:('a -> 'a -> int) -> 'a t -> bool val group_succ_by : ?eq:('a -> 'a -> bool) -> 'a t -> 'a list t (** Group equal consecutive elements. Linear time. Formerly synonym to [group]. + {b note}: Order of items in each list is unspecified. @since 0.6 *) val group_by : ?hash:('a -> int) -> ?eq:('a -> 'a -> bool) -> 'a t -> 'a list t (** Group equal elements, disregarding their order of appearance. - The result iterator is traversable as many times as required. precondition: for any [x] and [y], if [eq x y] then [hash x=hash y] must hold. + {b note}: Order of items in each list is unspecified. @since 0.6 *) val count : ?hash:('a -> int) -> ?eq:('a -> 'a -> bool) ->