Given a list of lists, such as ((a b c d) (e f g h) (i j k l) (m n o p) (q r s t))
, I'd like to write a transformation to a new list of lists consisting of the first item from each list, followed the second item from each list, etc. (in my example, the result of this would be ((a e i m q) (b f j n r) (c g k o s) (d h l p t))
).
Does this operation have a distinct name, apart from zip
? If so, what is that name?
The best word for it is probably transpose.
Your list of lists can be thought of as a matrix, and this is a matrix transposition.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With