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 fc3d230 commit d393fd1Copy full SHA for d393fd1
_overviews/cheatsheets/index.md
@@ -601,8 +601,8 @@ println(upper.getOrElse(""))</code></pre></td>
601
<td><pre class="highlight"><code>option.exists(f(_))</code></pre>
602
<em><strong>same as</strong></em>
603
<pre class="highlight"><code>option match {
604
- case Some(x) if f(x) => true
605
- case _ => false
+ case Some(x) => f(x)
+ case None => false
606
}</code></pre></td>
607
<td>Apply predicate on optional value or false if empty</td>
608
</tr>
0 commit comments