Skip to content

Commit 848b13c

Browse files
committed
revert example for flatten
1 parent a4db2d0 commit 848b13c

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

0 commit comments

Comments
 (0)