You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to deprecate (long term) Enum.uniq/2 and start promoting Enum.uniq_by/2.
We are changing it to make it consistent with everything else in Enum. All functions that allow you to customise how the operation works with anonymous functions end with _by, for example: max_by, min_by, group_by, sort_by, etc. And why do we use the _by? Because some functions already have the second arity version taken, such as sort/2.
The text was updated successfully, but these errors were encountered:
The idea is to rename the current Enum.uniq/2 to Enum.uniq_by/2 but still leave a Enum.uniq/2 definition that calls Enum.uniq_by/2 because we can't remove code. It will likely be officially removed just on Elixir 2.0.
We need to deprecate (long term) Enum.uniq/2 and start promoting Enum.uniq_by/2.
We are changing it to make it consistent with everything else in Enum. All functions that allow you to customise how the operation works with anonymous functions end with
_by
, for example:max_by
,min_by
,group_by
,sort_by
, etc. And why do we use the_by
? Because some functions already have the second arity version taken, such assort/2
.The text was updated successfully, but these errors were encountered: