Range golf challenge: apply predicate to a subrange, returning the original range modified.

rassoc rassoc at posteo.de
Fri Oct 7 16:49:33 UTC 2022


On 10/7/22 16:00, FeepingCreature via Digitalmars-d wrote:
> Thoughts?

How about your selector func wraps the elements, similar to Nullable or via SumType, and your modifier func operates on the marked ones during iteration while returning the others as is? Poor man's monads?


More information about the Digitalmars-d mailing list