Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/cftbat/do-things.html
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ <h4>Destructuring</h4>
<span class="tok-nv">you</span> <span class="tok-nv">need</span> <span class="tok-nv">to</span> <span class="tok-nv">cry</span> <span class="tok-nv">over</span> <span class="tok-nv">them</span><span class="tok-err">:</span> <span class="tok-nv">Pigpen</span>, <span class="tok-nv">Aquaman</span>
</code></pre></div></div>

<p class="Body"><span>Here, the rest parameter </span><code>unimportant</code><code>-choices</code><span> handles any number of additional choices from the user after the first and second.</span></p>
<p class="Body"><span>Here, the rest parameter </span><code>unimportant-choices</code><span> handles any number of additional choices from the user after the first and second.</span></p>
<p class="Body">You can also destructure maps. In the same way that you tell Clojure to destructure a vector or list by providing a vector as a parameter, you destructure maps by providing a map as a parameter:</p>
<div class="listingblock"><div class="content"><pre class="pygments highlight"><code data-lang="clojure" class="block"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">announce-treasure-location</span>
<span class="tok-err">➊</span> <span class="tok-p">[{</span><span class="tok-nv">lat</span> <span class="tok-ss">:lat</span> <span class="tok-nv">lng</span> <span class="tok-ss">:lng</span><span class="tok-p">}]</span>
Expand Down