document loops
almibe opened this issue · 2 comments
almibe commented
For and while loops don't seem to be documented (are those the only loops?). Maybe they could go on this page https://grain-lang.org/docs/guide/basics below if expressions? It would probably good to add a note about rec functions as an alternative to loops as well.
ospencer commented
I'd probably give it its own page, probably after mutation. Since Grain is largely a functional language I think it'd be good to introduce them a bit later!
ospencer commented
Taking a look over the docs as a whole, I think we should:
- move mutation to before functions
- add a page on arrays after lists
- add a page after arrays explaining loops