drop* and take* only for specific element values

Meta via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Aug 13 07:28:29 PDT 2014


On Wednesday, 13 August 2014 at 12:37:34 UTC, Nordlöw wrote:
> Are there variants of drop* and take* that only drop element if 
> its equal to a value kind of like strip does?
>
> If not I believe they should be added.

No, but it'd probably be useful. Maybe call them dropIf/takeIf, 
or just add an overload that takes a predicate... I'll look into 
making a pull request sometime this week. How do you envision 
these working?


More information about the Digitalmars-d-learn mailing list