Hi Tom,
The beauty of Elm is that, although one can program a full set of monad’s and in fact the Type’s of Maybe
, Result
, and Task
are basically monad’s without naming them as such, the language is completely usable without every getting into “Category Theory” at all…
OTOH, Elm can also be a vehicle to better understand these things that seem so obscure when one first encounters them through pure functional languages such as Haskell and PureScript; the interesting series of articles written by one of Elm’s own, @kvothe, makes this clear in showing that all of these concepts can be used in Elm and all that is missing is the names, as follows:
- Functors; where anything with a
map
function is actually a Functor… - Applicatives; where anything with a
map2
function can actually be an Applicative… - Monads; where anything with the
andThen
bind function is actually a monad… - Combinators; as in elm/parse is actually a full functionally combinator parser…
- Semi-groups and Monoids, where it is shown that Elm has these too.
- And hopefully more to come, showing that one can consider and explore all of Category Theory using Elm even though it isn’t formalized by the language…
The point I’m trying to make and the point of the article series is that if one already has made some attempt to learn Haskell, what they have learned is very much applicable to learning Elm but Elm can also be an excellent vehicle to aid in learning Haskell!