Skip to content

Commit 472b9eb

Browse files
committed
revert example for flatten
1 parent 6ee4178 commit 472b9eb

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
@@ -465,8 +465,8 @@ println(upper.getOrElse(""))</code></pre></td>
465465
<td><pre class="highlight"><code>optionOfOption.flatten</code></pre>
466466
<em><strong>same as</strong></em>
467467
<pre class="highlight"><code>optionOfOption match {
468-
case Some(x: Option[_]) =&gt; x
469-
case None =&gt; None
468+
case Some(Some(x)) =&gt; Some(x)
469+
case _ =&gt; None
470470
}</code></pre></td>
471471
<td>Extract nested option.</td>
472472
</tr>

0 commit comments

Comments
 (0)