We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc2c865 commit da08d78Copy full SHA for da08d78
_overviews/cheatsheets/index.md
@@ -611,8 +611,8 @@ println(upper.getOrElse(""))</code></pre></td>
611
<td><pre class="highlight"><code>option.forall(f(_))</code></pre>
612
<em><strong>same as</strong></em>
613
<pre class="highlight"><code>option match {
614
- case Some(x) if f(x) => true
615
- case None => false
+ case Some(x) => f(x)
+ case None => true
616
}</code></pre></td>
617
<td>Apply predicate on optional value or true if empty</td>
618
</tr>
0 commit comments