|
|
|
|
|
by arianvanp
3395 days ago
|
|
Folds are used in purescript all the time! Sure a foldr is less useful because it doesn't have the nice lazy preserving properties, but you can have strict left folds, which are tail recursive, and thus run in constant space. Elm, another haskell-like, _strict_ language, models entire applications around the strict left fold over events https://guide.elm-lang.org/architecture/ We actually do the same in Jobmachine. The application is driven by a strict left fold over incoming events and current state. |
|