title: Fail(or rather, Return) fast using functional java
body: <p>Apologies for the badly chosen title, couldn't think of a better title. Please feel free to suggest a new title.</p>
  
  <p>I want to write the following piece of code using Java 8 lambda expressions</p>
  
  <pre><code>List&lt;Function&lt;MyClass, Optional&lt;String&gt;&gt;&gt; functions //assume initialized
  for (final Function&lt;MyClass, Optional&lt;String&gt;&gt; function : functions) {
      final Optional&lt;String&gt; result = function.apply(objectOfMyClass);
      if (result.isPresent()) { //as soon as one of the function returns a non-null string, return
          return result; //
      }
  }
  </code></pre>
  
  <p>Any suggestions on how to go about it?</p>