On Thursday, 6 November 2014 at 15:53:27 UTC, Jack Applegame wrote:
I have rectangular forward range of forward ranges (not arrays):
[
  [a11, a12, ... a1N],
  [a21, a22, ... a2N],
  ...
  [aM1, aM2, ... aMN]
]

I need lazy forward range:
[
 a11 + a21 + ... aM1,
 a12 + a22 + ... aM2,
 ...
 a1N + a2N + ... aMN
]
Range of sum elements of every columns;

M, N - runtime values;

Is there a way to do this using only Phobos algorithms and range functions?

this should be a textbook case for std.range.transposed, but I can't seem to get it to work.

Reply via email to