Better lambdas!!!!!!!!!!

via Digitalmars-d digitalmars-d at puremagic.com
Thu Sep 10 12:37:52 PDT 2015


On Thursday, 10 September 2015 at 17:55:06 UTC, Prudence wrote:
> by specifying the parameter names in the signature, we don't 
> have to specify them in the lamba creation. This doesn't 
> replace the original way, just adds the ability to infer the 
> names if they are not specified.
>
> Of course, this hides the names outside the lambda, but a 
> warning could be issued(no different than if one does it 
> explicitly.

How about just having numbered parameters like this:

{ $2 < ($1*$2) }




More information about the Digitalmars-d mailing list