anchor.diff:  
   gof(6)
   > true
  +
   ----
   The essence of functional programming is doing this, create programs from composing small functions into larger functions, which provide us with the type safety and the determinism of pure functions. but what happens when we have functions that require to handle a side effect and return the appropriate type constructor?
  +
   [source, scala]
   ----
   val f: Int => Int = 
  
positive.code: = Side Effects and How To Deal With Them The Cool Way, Part 2: Monads Introduction
  
  :published_at: 2016-31-10
  :hp-tags: monad
  
  In http://www.lunatech.com/blog/WASQJiQAANmjwKxf/side-effects-and-how-to-deal-with-them-the-cool-way-part-1-pure-fonctions-and-functors[part 1] of this series we learnt how to decouple the code that deals with side effects from our pure functions by using functors (Any type constructor which implements the map function). Now lets see how we can extend our functors so that we can sequence computations that each fall under the indeterminism of side effects.
  
negative.code: val total: Int => Option[Int] = 
  x => sumIfPositive(6).map(sumIfMoreThan10)
  ----
  
  Oh no, we have a problem, we cannot compose side effects only using `map`, we need a new mechanism for combination. Lets do it then! lets introduce a function similar to `map` but called `flatMap`! (Because it will 'flatten' the structure between two functors.)
  
  == Monads! The Combinator We Were Looking For
  