This exploration of free monads is based on
Compositional Application Architecture With Reasonably Priced Monads by Rúnar Bjarnason.
Updated to use scalaz 7.1.4, because 7.2 is not released yet and Free Monads have changed/restructured in 7.2.
Not too hard if you know what you're doing, but spend many hours trying to figure this out. Free Monads using scalaz 7.2 is much nicer and and follows the implementation pattern described in "Functional Programming in Scala". Recommend to use that if you can choose scalaz 7.2.