-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement generators #29
Comments
Some way of passing data back to the generator would also be nice. |
Iterators with similiar API could be implemented without any modifications to the interpreter. |
How would they work? Use an array as a stack or something? |
This is how I implemented them:
Usage:
|
If I understand correctly this only allows a single value to act as the state of the generator. It is also quite brittle if the quote happens to misuse the stack. Having a generator accidentally read or write onto your stack creates hard-to-debug issues. |
Make it possible to turn quotes into interruptible programs.
Proposed example:
The text was updated successfully, but these errors were encountered: