Some common metaphors for Elm's Universal Pattern (Applicative Pattern).


  • Random generators
  • Apply mapping functions to vanilla value functions to keep things clean


Record constructors

Some more blog posts by Joël that related to Elm's Universal Pattern:

Joël's journey to building a parser combinator:

  • Nested cases -
  • Extracted Result functions -
  • Introducing a Parser alias and map2 -
  • Re-implementing with elm/parser -
  • Getting Unstuck with Elm JSON Decoders - because mapping is universal, you can solve equivalent problems with the same pattern (described in this post)