title: How can I reverse of flow of Option Monad?
body: <p>say, I have a bunch of "validation" functions that return None if there is no error, otherwise it return  Some(String) specifying the error message.  Something like the following ...</p>
  
  <pre><code>def validate1:Option[String] 
  def validate2:Option[String]
  def validate3:Option[String]
  </code></pre>
  
  <p>I am going to call them in a sequence and as soon as one returns Some(String), I stop and return the same. If it returns None, I go to the next until the sequence is over. If all of them return None, I return None.</p>
  
  <p>I would like to glue them together in a "for expression". Something like ... </p>
  
  <pre><code>for( a &lt;- validate1; b &lt;- validate2; c &lt;- validate3) yield None;
  </code></pre>
  
  <p>However, Option flows exactly the opposite what I want here. It stops at None and follows with Some(String).</p>
  
  <p>How can I achieve something like that?</p>