Hi Anastasiya, I like the proposal. A PR will be appreciated, thank you!
On Fri, Mar 19, 2021 at 8:29 PM Anastasiya Dyachenko
wrote:
> Hi! I'd like to propose adding a 3rd optional argument to Enum.uniq_by
> function, which will decide which one of the duplicated values should be
> kept. This fu
Hi! I'd like to propose adding a 3rd optional argument to Enum.uniq_by
function, which will decide which one of the duplicated values should be
kept. This function will accept 2 values and return one of them, that
should be kept.
Example:
Enum.uniq_by(
[a: 1, a: 2],
fn {k, v} -> k end,