I’m having trouble trying to zip lists of different lengths because elixir only returns the first match of each list.
I have the following list of lists:
[ ["e5", "e7", "e7", "e8", "e8", "e2", "e2", "e0", "e0", "e0"], ["B5", "B5", "B5", "B3", "B1", "B1", "B1", "B0", "B1", "B1"], ["G5", "G5", "G5", "G2", "G2", "G2"], ["D7"] ] Elixir return this:
[{“e5”, “B5”, “G5”, “D7”}]
And I would like to get the following list:
[ ["D7", "G5", "B5", "e5"], ["G5", "B5", "e7"], ..., ["B1", "e0"] ] Is there any way to accomplish this with zip or any other function?