Skip to content

Commit

Permalink
Clarify order on uniq/uniq_by, closes #14304
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Mar 3, 2025
1 parent d89fabe commit c63aeb9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/elixir/lib/enum.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3837,6 +3837,9 @@ defmodule Enum do
@doc """
Enumerates the `enumerable`, removing all duplicate elements.
The first occurrence of each element is kept and all following
duplicates are removed. The overall order is preserved.
## Examples
iex> Enum.uniq([1, 2, 3, 3, 2, 1])
Expand All @@ -3862,7 +3865,8 @@ defmodule Enum do
considered duplicates if the return value of `fun` is equal for
both of them.
The first occurrence of each element is kept.
The first occurrence of each element is kept and all following
duplicates are removed. The overall order is preserved.
## Example
Expand Down

0 comments on commit c63aeb9

Please sign in to comment.