First Draft: opUnwrapIfTrue
Quirin Schroll
qs.il.paperinik at gmail.com
Wed Sep 16 10:50:10 UTC 2026
On Thursday, 26 February 2026 at 16:01:22 UTC, Paul Backus wrote:
> A better solution would be to redesign your API to combine the
> check and the access into a single operation, either with a
> higher-order function like […] an `opApply` overload:
This is why I think we need loop-else. The idea is simple: A
loop-else runs if the loop had no iteration through its body. An
`if` would then, effectively, be a special case of a loop that
runs once if the condition is true and doesn’t run if it’s false.
More information about the dip.development
mailing list