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 02c4981 commit cd381e2Copy full SHA for cd381e2
_cheatsheets/index.md
@@ -610,8 +610,8 @@ println(upper.getOrElse(""))</code></pre></td>
610
<td><pre class="highlight"><code>option.forall(f(_))</code></pre>
611
<em><strong>same as</strong></em>
612
<pre class="highlight"><code>option match {
613
- case Some(x) if f(x) => true
614
- case None => false
+ case Some(x) => f(x)
+ case None => true
615
}</code></pre></td>
616
<td>Apply predicate on optional value or true if empty</td>
617
</tr>
0 commit comments