Skip to content

Commit cd381e2

Browse files
committed
fix false to true in return of None.forall
1 parent 02c4981 commit cd381e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_cheatsheets/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,8 @@ println(upper.getOrElse(""))</code></pre></td>
610610
<td><pre class="highlight"><code>option.forall(f(_))</code></pre>
611611
<em><strong>same as</strong></em>
612612
<pre class="highlight"><code>option match {
613-
case Some(x) if f(x) =&gt; true
614-
case None =&gt; false
613+
case Some(x) =&gt; f(x)
614+
case None =&gt; true
615615
}</code></pre></td>
616616
<td>Apply predicate on optional value or true if empty</td>
617617
</tr>

0 commit comments

Comments
 (0)