Skip to content

Commit c63aeb9

Browse files
committed
Clarify order on uniq/uniq_by, closes #14304
1 parent d89fabe commit c63aeb9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/elixir/lib/enum.ex

+5-1
Original file line numberDiff line numberDiff line change
@@ -3837,6 +3837,9 @@ defmodule Enum do
38373837
@doc """
38383838
Enumerates the `enumerable`, removing all duplicate elements.
38393839
3840+
The first occurrence of each element is kept and all following
3841+
duplicates are removed. The overall order is preserved.
3842+
38403843
## Examples
38413844
38423845
iex> Enum.uniq([1, 2, 3, 3, 2, 1])
@@ -3862,7 +3865,8 @@ defmodule Enum do
38623865
considered duplicates if the return value of `fun` is equal for
38633866
both of them.
38643867
3865-
The first occurrence of each element is kept.
3868+
The first occurrence of each element is kept and all following
3869+
duplicates are removed. The overall order is preserved.
38663870
38673871
## Example
38683872

0 commit comments

Comments
 (0)