Hacker News new | past | comments | ask | show | jobs | submit login

You implement your loop macro such that it binds some variable to a continuation, that when invoked, exits the loop. Then when you want to exit the loop, you invoke the continuation.

(Loop exits, exceptions, returns from functions, etc. are all special cases of continuations.)

This is an improvement over something like Perl's "last LABEL" statement, because you can pass the continuation around and exit the loop from anywhere you desire.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: