Nested Inferred Templates Don't Work?
Mehrdad
wfunction at hotmail.com
Mon May 30 23:04:33 PDT 2011
Hi!
Say I've got a piece of code like this, which gives me the longest line
in a file:
pipe!(readText, splitlines, map!((a) { return a.length; }),
reduce!max)("Demo.txt");
The problem is, it doesn't work. Which is kind of a bummer. :(
Is there an **elegant** way to get around it?
Of course, I already know I can do this:
pipe!(readText, splitlines, map!q{ a.length }, reduce!max)("Demo.txt");
but using strings is very ugly (IMO).
Thanks!
More information about the Digitalmars-d
mailing list