On Sunday, 29 December 2019 at 09:44:18 UTC, MoonlightSentinel wrote:
On Sunday, 29 December 2019 at 08:31:13 UTC, mipri wrote:
On Sunday, 29 December 2019 at 08:26:58 UTC, Daren Scot Wilson wrote:

int i = a.countUntil!(v => v == 55);
assert(i == 2);

A predicate isn’t required, countUntil accepts single elements:

int i = a.countUntil(55);

I was just about to go looking for something like this. Thanks, guys.

Reply via email to