Is there a skipOver function for InputRanges?

realhet real_het at hotmail.com
Tue Oct 8 11:39:02 UTC 2024


On Tuesday, 8 October 2024 at 10:43:31 UTC, Dennis wrote:
> On Tuesday, 8 October 2024 at 07:14:28 UTC, realhet wrote:
>> Is there a way to do it nicer with Phobos?
>
> You can use `find` with a negated predicate: `find!(x => 
> !x.front.all!isWhite)`

Perfect, Thank You!

I guess skipOver is more complex, it looks ahead, it's not just 
for one element, that's why it needs a ForwardRange.


More information about the Digitalmars-d-learn mailing list