Not commenting on the feature itself, but I believe there's a convention in 
the collection stdlib of keeping the same function names, but accept an 
extra parameter, for default values. See:

   - Enum.find/3
   - Enum.find_value/3
   - Map.pop/3
   - Keyword.get/3


On Sunday, June 13, 2021 at 10:27:53 AM UTC-7 [email protected] wrote:

> Hi,
>
> Would the community be interested in adding versions of of the Enum/Stream 
> zip functions that allow for a default value to be set when the enumerables 
> aren't all the same length?  I was thinking of the following name/arity 
> combos:
>
> {Enum, Stream}.zip_all/2 
> {Enum, Stream}.zip_all/3 
> {Enum, Stream}.zip_all_with/3
> {Enum, Stream}.zip_all_with/4
> Enum.zip_all_reduce/4
> Enum.zip_all_reduce/5
>
> I had some ideas for how to implement this and could work on a PR if the 
> proposal is accepted.
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/0ffe4166-3032-4991-a637-03a7db585848n%40googlegroups.com.

Reply via email to