On Thu, 22 Sep 2011 11:22:10 +0200, Jacob Carlborg <d...@me.com> wrote:

auto newrange = filter!"a<5"(map!"2*a"(range));

At first some people get the heebiejeebies when seeing string-based
lambda and the implicit naming convention for unary and binary
functions. More importantly, there's the disadvantage you can't access
local functions inside a string lambda. We should probably add a
specialized lambda syntax.

I like this syntax:

auto newRange = range.map(a => 2 * a).filter(a => a < 5);

I dislike this syntax, in that it seems to pass the delegates as normal
function parameters, rather than template parameters.
New version:

auto newRange = range.map!(a => 2 * a).filter!(a => a < 5);

--
  Simen

Reply via email to