On Tuesday, 7 April 2015 at 14:46:52 UTC, cym13 wrote:
EDIT: mis-formatted previous snippet

import std.algorithm, std.stdio, std.range, std.conv;
void main()
{
    stdin
        .byLine
.filter!(s => !s.empty && s.front != '#’) // Filter with this lambda function
        .map!(s => s.to!double) // Map the strings to doubles
        .array // Sorting needs random access
        .sort!((a, b) => a < b) // Another lambda
        .take(10) // Applyable to any range
        .writeln;
}

Yup, I get that, still does not explain why UFCS can't extend overload set. Especially if there would be no conflict wrt to overload of method vs free function.

Reply via email to