transversal sum
    Jack Applegame via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Thu Nov  6 07:53:26 PST 2014
    
    
  
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?
    
    
More information about the Digitalmars-d-learn
mailing list