Let's Play Code Golf

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Mon Feb 23 14:04:10 PST 2015


On 2/23/15 1:30 PM, Steven Schveighoffer wrote:
> foreach(x; stdin.byLine)
>      writefln("%0.15f", map!(a =>
> (a&1?-1:1)/(2.0*a+1))(iota(x.to!int)).sum);

Wonder why didn't you lead with the iota? -- Andrei



More information about the Digitalmars-d mailing list