loop-thru: function [cond body] [ return: does [throw/name () 'return] while cond bind body 'body ] func2: func [spec [block!] body [block!]][ func spec compose/only [catch/name (body) 'return] ] f: func2 [x] [ loop-thru [x < 10] [x: x + 1 if x = 5 [return]] print "you see where return takes me?" ] f 2
reduce <function>has no effect. You can remove all those
reduceyou are using.
applywill be a better alternative once it gets implemented.
mold/allto be true. Actually, even that won't be enough, as definitional bindings would not be preserved. Only
mold/binwould really work (can store bindings too) once a Redbin encoder will be implemented in R/S (we only have a decoder for now).