UFCS-style invocation of lambdas

Peter Alexander peter.alexander.au at gmail.com
Fri Jan 25 13:37:15 PST 2013


Would this be possible without breaking the grammar?

bool isPalindrome = getRange().(r => equal(r, retro(r)));


I find this way of writing that expression more natural and 
efficient than the alternatives:

auto r = getRange();
bool isPalindrome = equal(r, retro(r));

or

bool isPalindrome = (r => equal(r, retro(r)))(getRange());


More information about the Digitalmars-d mailing list