transversal sum

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Nov 6 09:32:21 PST 2014


Marc Schütz:

> We'd need something taking and returning a RoR that "mirrors" 
> them diagonally. Then we could simply apply `map!(r => r.sum)` 
> on the result.

A simple solution is to create a row of values, and then sum them 
correctly while you scan the rows.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list