anchor.diff:  
   	def isDefined: Boolean
   
  -	def map[B](f: A=>B): Option[B] = flatMap(x => Some(f(x)))
  +	def map[B](f: A=>B): Option[B] =
  +    flatMap(x => Some(f(x)))
   
  -	def flatMap[B](f: A=>Option[B]): Option[B] = if(isDefined) f(value) else None
  -}
  +	def flatMap[B](f: A=>Option[B]): Option[B] =	
  +    if(isDefined) f(value) else None
  +    }
   
   ----
   As you may have already guessed, the scala library already implements this function, but lets analyse it any way: `flatMap` is very similar to our last definition to `map`, but since the provided effectful function `f` is already giving us an `Option` then we do not need to wrap it. Also notice that we redefined `map` in terms of our new `flatMap`, clever right?
   
   Now this new mechanism will allow us to combine effectful functions! (functions that return a functor instead of a pure value).
  -
   [source,scala]
   ----
  -val f: Int => Int = x => x + 5
  -val filter10: Int => Option[Int] = x => if (x > 10) Some(x) else None
  -val sumIfMoreThan10: Int => Option[Int] = x => filter10(x).map(f)
  -val sumIfPositive: Int => Option[Int] = x => if (x > 0) Some(f(x)) else None
  -val total: Int => Option[Int] = x => sumIfPositive(x).flatMap(sumIfMoreThan10)
  +val f: Int => Int = 
  +x => x + 5
  +val filter10: Int => Option[Int] =
  +x => if (x > 10) Some(x) else None
  +val sumIfMoreThan10: Int => Option[Int] =
  +x => filter10(x).map(f)
  +val sumIfPositive: Int => Option[Int] =
  +x => if (x > 0) Some(f(x)) else None
  +val total: Int => Option[Int] =
  +x => sumIfPositive(x).flatMap(sumIfMoreThan10)
   total(6)
   > Option[Int] = Some(16)
   total(-1)
  
positive.code: found   : Int => Option[Int] required: ? => Int 
  f compose filter
  ----
  
  On this case our `map` function from our functor can help us:
  
  [source,scala]
  ----
  val sumIfMoreThan10: Int => Option[Int] =	x => filter10(x).map(f)
  
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
  