grain-lang/grain-lang.org

document loops

almibe opened this issue · 2 comments

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.

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!

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