Demonstrating FOR-BOTH: Loop Composability For The Win ❗

Pursuant to the new rules for having a return from FUNC[TION], this either needed to RETURN the result or be changed to a lambda.

I chose to add a RETURN just so that it didn't look too "foreign". (Or at least so that this talking-point example can focus its foreignness on the explanation of META and UNMETA).

But it could be written without a RETURN as:

for-both: lambda [var blk1 blk2 body] [
    unmeta/lite all [
        meta/lite for-each var blk1 body
        meta/lite for-each var blk2 body
    ]
]
1 Like