Transposing lists are a quite common operation and people often talk about it online like on this forum. From working with CSV, to doing the advent of code, transposing matrix is everywhere.
The impact on the eco-system would be limited. This is just another function.
The impact on learning would be good since this function is quite common in other language. Even VBA has it.
This suggestion is easily implemented with the state of Elixir
Some people wont need it but others will be grateful to find it.
There is a transpose function in Explorer which I think is a better fit than the standard library. Lists of lists are just flat not an efficient structure on which to do matrix operations, and I donât think it makes sense to build a set of functions around using them for that purpose.
So we need an external dependence to do something as trivial as rotate a list of list? I am not asking to handle matrix in the standard library, I am asking for something for List and Enum.
Serious question: when are you rotating a list of lists in Elixir? Advent of code and other puzzles donât count.
Explorer and Nx were created by the creators of elixir explicitly to do number crunching operations in the language. Given the extra dependencies involved and the relatively specialized area of work for those operations within the general use cases of the language.
Yes it is working. Note that what I am looking for is not quite an implementation of transpose but a way to add transpose to the library. This goal is not have to write it each time
transpose = fn nested -> Enum.zip_with(nested, & &1) end
Last time it was to handle data send by a client in day job. It was not in Elixir. So the answer to " Any update on a transpose function?" would be ânone because not enough people ask for itâ right?
I donât speak for Ben but IMO the answer would be more along the lines of: âWe deem this a more specialized functionality and as such we will not put it in the standard library and into a dedicated number-crunching library insteadâ.