Hi Oskar, I think the best option in this case is to move it to a private function called transpose and then call Enum.zip_with/2. This makes the intent clear without adding to the API, especially because the term transpose it self can be overloaded.
On Fri, Dec 3, 2021 at 1:56 PM Oskar <kookos...@gmail.com> wrote: > Hi! > > Would you be open to `Enum.transpose(enumerable)` or > `List.transpose(list)` functions? You can already transpose a list with > `Enum.zip_with(list, & &1)` and `Stream.zip_with(list, & &1)`, however it's > a bit difficult to understand the intent on first glance, whereas > `transpose/1` would be a clear operation. I am unsure how other enumerables > would fit into this, so maybe it should go under the List module. > > What do you think? > > Oskar > > -- > 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 elixir-lang-core+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/9c2526e3-02af-4189-8bbf-6365a72ce72fn%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/9c2526e3-02af-4189-8bbf-6365a72ce72fn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2BAGBqC95Tj6O5q271n__EsN8VHsA8Xb6BDnk1Ab5GBjA%40mail.gmail.com.