Return outer function in do block

I occasionally miss common-lisp:return-from in Julia, which has no such construct AFAIK.

A version of map, mapreduce & friends (foldl etc) that allow early termination (eg based on a sentinel value or a flag that is returned) could help in cases like this, and there is no reason a package could not implement these efficiently (maybe there is one already, I just missed it). Cf

2 Likes