Looping Constructs #847
eliaslfox
started this conversation in
Ideas and Proposals
Replies: 1 comment
-
F# has Computational Expressions where you can define how looping works for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
[Moved from #840]
I had some initial thoughts about adding looping constructs to Coalton. This isn't a concrete plan for implementation.
Possible looping constructs could include:
I think whatever looping constructs get added, they should support break and continue.
A few other looping related feature that are worth considering:
Breaking from
loop
with a value like in Rust.Breaking and continue with named blocks like in JavaScript and many other languages.
I also want to design something with a plan for how it can be optimized. Ideally the following two examples would compile identically.
Beta Was this translation helpful? Give feedback.
All reactions