Function to print a diamond shape

bearophile bearophileHUGS at lycos.com
Fri Mar 28 14:35:24 PDT 2014


> void main(){
> import std.stdio,std.range,std.algorithm,std.conv;
> auto m=10.iota.map!(_=>readln.split.to!(int[]));
> m.map!sum.chain(m.transposed.map!sum).reduce!max.write;
> }

It used to work, but with the latest changes I think I have 
broken it.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list