We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Python has a feature like this and I think it'd be good for Ceylon.
Basically you can do something like this:
{Integer *} myGenerator(Integer start) { variable Integer k = start; while(k < 10) { yield k++; print("Yeah!"); } } shared void run() { for (k in myGenerator(7)) { print(k); } }
This will print:
7 Yeah! 8 Yeah! 9 Yeah!
The text was updated successfully, but these errors were encountered:
There was already some discussion about this in #312, #1168 and #1174
Sorry, something went wrong.
No branches or pull requests
Python has a feature like this and I think it'd be good for Ceylon.
Basically you can do something like this:
This will print:
The text was updated successfully, but these errors were encountered: