Python's features, which requires D
anonymous via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat May 23 13:57:09 PDT 2015
On Saturday, 23 May 2015 at 20:25:18 UTC, Dennis Ritchie wrote:
> This does not work!
>
> enum n1 = 5;
> writeln(stdin.byLine
> .map!(line => line.split(" ").map!(x => to!int(x)))
> );
> -----
> http://rextester.com/VGHZF81178
The code itself is ok.
That site has broken newlines. You can see here that
std.ascii.newline is different from what the site actually feeds
to the program: <http://rextester.com/IIT33098>.
You can work around that by passing the correct line terminator
to byLine: <http://rextester.com/SOW95508>.
More information about the Digitalmars-d-learn
mailing list