title: Handling fail-fast failures when the return type is Option[Error]
body: <p>I have posted quite several questions about failure handling in Scala and I really thank you all for your answers.</p>
  
  <p>I understand my options when dealing with Either and Scalaz or a for comprehension, and I have another (last?) question:</p>
  
  <p>How to do a fail-fast sequence of operations when the operations are dealing with the outside non-functional world, like a DB?</p>
  
  <hr>
  
  <p>I mean I have a method like that:</p>
  
  <pre><code>def insertItem(item: Item): Either[Error,Item]
  </code></pre>
  
  <p>Thanks to Either and these answers, I know how to do it with Either: <a href="https://stackoverflow.com/questions/12107272/chaining-method-calls-with-either">Chaining method calls with Either</a> and 
  <a href="https://stackoverflow.com/questions/12307965/method-parameters-validation-in-scala-with-for-comprehension-and-monads">Method parameters validation in Scala, with for comprehension and monads</a></p>
  
  <p>But my <code>Item</code> case class is immutable and it doesn't really make sense to return it as a <code>Right</code> since the caller already has the value.</p>
  
  <p>Thus how can I do the same kind of thing with:</p>
  
  <pre><code>def insertItem(item: Item): Option[Error]
  </code></pre>
  
  <hr>
  
  <p>In my application, when an user is created, we also create some items for him.
  If an item fails to create, then the whole process should stop.</p>
  
  <p>When I use directly <code>Option[Error]</code> in a for comprehension, I don't think I'll get the result I expect.</p>
  
  <p>I guess it makes sense to do something like that:</p>
  
  <pre><code>for {
    _ &lt;- insertItem(item1).toLeft("???").right
    _ &lt;- insertItem(item2).toLeft("???").right
    _ &lt;- insertItem(item3).toLeft("???").right
  }
  </code></pre>
  
  <p>But as the values "???" I put in my Right are never useful, I guess I'm missing the elegant solution which do not involve creating Rights that will never be used.</p>
  
  <p>I think I'm looking for something that will continue the for comprehension only when the result is <code>None</code>, which is kind of weird because I just want to continue to the next operation, and not do a real <code>map</code> operation.</p>
  
  <p>By the way, if possible, I would like both non-Scalaz and Scalaz solutions.
  I'm not sure Scalaz handle such things, because it seems more focused on real functional programming and perhaps do not provide code for side-effect behaviors like my use case?</p>