1. 5

  2. 5

    It’s worth noting that in advanced Elm, recursion is used rarely. Recursion is a model that is most often used for creating the building blocks - e.g, foldl or some internal parsing structures. The majority of Elm developers do not use recursion often, however - since the canonical style is to prefer chaining commands wherever possible. foldl and map are commonly used instead.

    1. 3

      That’s definitely common in most functional languages. Always look at your collections library! There’s usually tons of goodies there that will mean you don’t need raw iteration machinery. :)