Re: [elixir-core:11707] [Proposal] Adding Access.find/1

2024-03-19 Thread Jean Klingler
I like it. It would be to `Access.filter` what `Enum.find` is to `Enum.filter`. I think it would be a nice addition as it can express operations that would be quite verbose otherwise. Le mer. 20 mars 2024 à 02:30, 'oliver@googlemail.com' via elixir-lang-core a écrit : > Hi. > > I already mad

[elixir-core:11707] [Proposal] Adding Access.find/1

2024-03-19 Thread 'oliver....@googlemail.com' via elixir-lang-core
Hi. I already made a PR but was redirected here. ;-) This new function Access.find/1 would basically work like Enum.find/2 but for get_in/2 and similar functions. It can be used for scenarios like: - Popping the first found element. - Updating only the first found match in a list. - To get_in/2