Skip to content

Commit da08d78

Browse files
committed
fix false to true in return of None.forall
1 parent fc2c865 commit da08d78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_overviews/cheatsheets/index.md

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

0 commit comments

Comments
 (0)