commonLength

"Nordlöw" via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jan 15 12:25:12 PST 2015


On Thursday, 15 January 2015 at 20:21:26 UTC, Nordlöw wrote:
> I would have implemented countUntil() to return
>
>     -length
>
> upon failure instead of
>
>     -1
> .
>
> Then I could have just returned abs of the return value from 
> commonUntil.

I wonder if we could add an extra overload to countUntil in 
Phobos that takes an enum as first argument similar to zip's 
StoppingPolicy. Something like FailCountPolicy.


More information about the Digitalmars-d-learn mailing list