aloisdg

aloisdg

Any update on a transpose function?

Any news about adding a transpose function to the standard lib? It was discussed on the mailing list in 2021, but nothing since.

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.

cheers,

Most Liked

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

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.

LostKobrakai

LostKobrakai

Isn‘t Enum.zip_with(nested, & &1) what you‘re looking for?

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

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.

Last Post!

aloisdg

aloisdg

alright. thank you

Where Next?

Popular in Discussions Top

AstonJ
If a newbie asked you about Phoenix Contexts, how would you explain the basics to them? Feel free to be as concise or in-depth as you li...
New
restack_oslo
Hello, Please pardon me for any faux paux. I am 46 and this is my first time on a forum of any kind. I wanted to to get answers from tho...
New
AstonJ
I’ve just started the Phoenix part of the utterly brilliant online course by @pragdave. On generating the Phoenix app he uses the --no-ec...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40082 209
New
slashdotdash
Phoenix Live View is now publicly available on GitHub. Here’s Chris McCord’s tweet announcing making it public.
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New
Fl4m3Ph03n1x
Background A few days ago I was listening to The future of Elixir from Elixir Talks, with Dave Thomas (@pragdave ) and Brian Mitchell. I...
New

Other popular topics Top

grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54092 488
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement