It probably sounds insane that Elm doesn't have `for` or `while`. It would
to me before exposure to functional programming.
There are prebuilt functions for working with collections like List
<http://package.elm-lang.org/packages/elm-lang/core/latest/List> and Array
<http://package.elm-lang.org/packages/elm-lang/core/4.0.5/Array> which will
take care of most needs.
When you find you need something a bit more custom, a recursive loop is the
normal way. Those take a little practice to get the feel for them.
Often when I write my own recursive loop, I later find that I can
accomplish the same by combining list operations or by just playing with
One current limitation of Elm is that there is no tail call elimination
when using a recursive loop, so if you write your own loop and have a large
list, you can get a stack overflow. In practice, this is not a typical
problem due to other factors. I.e. miles of data on the screen impacts
performance, and is not considered good UX.
On Wednesday, October 12, 2016 at 5:52:31 AM UTC-5, Patricia Nicole
> hi can i ask what is the repetiton control structucture of this
> programming languages?
You received this message because you are subscribed to the Google Groups "Elm
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.