Skip to content

Commit 02c4981

Browse files
committed
note about foreach returning Unit
1 parent 5c0315e commit 02c4981

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

_cheatsheets/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,9 @@ println(upper.getOrElse(""))</code></pre></td>
481481
<pre class="highlight"><code>option match {
482482
case Some(x) =&gt; f(x)
483483
case None =&gt; ()
484-
}</code></pre></td>
485-
<td>Apply a procedure on optional value</td>
484+
}
485+
()</code></pre></td>
486+
<td>Apply a procedure on optional value. Returns <code>Unit</code></td>
486487
</tr>
487488
<tr>
488489
<td><pre class="highlight"><code>option.fold(y)(f(_))</code></pre>

0 commit comments

Comments
 (0)