-
-
Notifications
You must be signed in to change notification settings - Fork 350
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
Loops Possible using When Keyword #752
Comments
technically these are repetitions, not loops, so its okay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
when
keyword makes code run when a variable mutates.So, using the functionality of said keyword, we can make it run code that mutates the variable which runs the code.
Here's an example implementation (with a limit so the code doesn't go haywire):
Unfortunately limiting the number of times
when
runs code when a variable mutates can cause some problem in code that uses it in the correct way.So, how would you go about avoiding this kind of loop in DreamBerd?
The text was updated successfully, but these errors were encountered: