u/friedbricein r/haskell • Recommends
On “design patterns”
"Design Patterns" in Haskell tend to be rather meta. I think this is because most Haskell code I run into in the wild is able to do its job with a minimal amount of fuss and ceremony. You need some code to compute some thing? Oh, okay, so write out the formula/rules/process for computing your thing, and that's your Haskell program. And that's kinda all there is to it, usually. It tends to be excruciatingly straightforward.
You probably want to take a look at An Introduction to Elm and elm-flatris and then elm-spa-example to get an idea about what I'm talking about.
If there is one overriding theme in FP that could be called a "design pattern," it's this: make invalid states unrepresentable…