drop* and take* only for specific element values

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Aug 13 17:56:46 PDT 2014


On Wednesday, 13 August 2014 at 21:22:31 UTC, Nordlöw wrote:
>     return range.find(a => a != element);
> What have I done wrong?

You forgot the !, making the predicate a function argument. It 
should be

     return range.find!(a => a != element);

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list