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