August 2016
Intermediate to advanced
635 pages
14h 5m
English
Monads are tools that help you compose functions.
Like primitive types, monads are structures that can be used as the containers that functors "reach into". The functors grab the data, do something to it, put it into a new monad, and return it.
There are three monads we'll focus on:
So in addition to arrays (map) and functions (compose), we'll have five functors (map, compose, maybe, promise and lens). These are just some of the many other functors and monads that are out there.
Maybes allow us to gracefully work with data that might be null and to have defaults. A maybe is a variable that either has some value or it doesn't. And it doesn't matter to the caller.
On its own, it might seem like this is not that big a ...