A set of challenges for jump starting your understanding of monads.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Now your Set4.hs module has fairly decent set of abstract tools all built on the Monad
interface. Now go back through sets 1, 2, and 3 and redo them all using the library of functions you built up in Set4.hs. Since Gen
is now a newtype you will have to make some changes to the functions that use it. This may seem like a waste of time, but it will develop your familiarity with the names actually used by Haskell’s monad library. This is the core of developing a working knowledge of monads. The first three sets were the motivation. Now we’re getting to the real world use.