Hello! 

I was thinking about zip_with/3 et al. (don't judge me I'm in a lockdown). 

Currently they work by returning a list, but would it not make more sense 
for it to take an accumulator?

```elixir
Enum.zip_with([1, 2], [3, 4], %{}, fn left, right, acc -> Map.put(acc, 
left, right) end)
%{ 1 => 3, 2 => 4 }

Enum.zip_with([1, 2], [3, 4], [], fn left, right, acc -> [{left, right} | 
acc] end)
[{1, 3}, {2, 4}]
```
If so... I guess it also opens to door for a zip_while.

Am I mad? Has science gone too far?

Best

Adz


-- 
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/633112b0-af83-4843-b37e-946bf48bdc5dn%40googlegroups.com.

Reply via email to