Switching rows with columns

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 4 08:28:55 PDT 2015


I have a range of ranges and need to change it so the elements 
are column-aligned instead of row-aligned.

For example,
[[1, 2, 3],
  [4, 5, 6],
  [7, 8, 9]]
would change into
[[1, 4, 7],
  [2, 5, 8],
  [3, 6, 0]].

Can I even do this with ranges, and if so, how?


More information about the Digitalmars-d-learn mailing list