snipt

Ctrl+h for KB shortcuts

Scheme

Problems

1
2
3
4
5
6
1. (length l)
2. (max l)
3. Sum Xi (odd) Xi^2 in l = (X1, X2, ..., Xn)
4. Define map with accumulate
5. (insert-sort l)
6. (arg-count a1 a2... )
https://snipt.net/embed/8d8a1b73876ca678cc3afa372e5199de/
https://snipt.net/raw/8d8a1b73876ca678cc3afa372e5199de/
8d8a1b73876ca678cc3afa372e5199de
scheme
Scheme
6
2016-09-21T12:07:44
True
False
False
/api/public/snipt/10090/
problems
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="mi">1</span><span class="o">.</span> <span class="p">(</span><span class="nb">length </span><span class="nv">l</span><span class="p">)</span> </span><span id="L-2"><a name="L-2"></a><span class="mi">2</span><span class="o">.</span> <span class="p">(</span><span class="nb">max </span><span class="nv">l</span><span class="p">)</span> </span><span id="L-3"><a name="L-3"></a><span class="mi">3</span><span class="o">.</span> <span class="nv">Sum</span> <span class="nv">Xi</span> <span class="p">(</span><span class="nf">odd</span><span class="p">)</span> <span class="nv">Xi^2</span> <span class="nv">in</span> <span class="nv">l</span> <span class="nv">=</span> <span class="p">(</span><span class="nf">X1,</span> <span class="nv">X2,</span> <span class="o">...,</span> <span class="nv">Xn</span><span class="p">)</span> </span><span id="L-4"><a name="L-4"></a><span class="mi">4</span><span class="o">.</span> <span class="nv">Define</span> <span class="nv">map</span> <span class="nv">with</span> <span class="nv">accumulate</span> </span><span id="L-5"><a name="L-5"></a><span class="mi">5</span><span class="o">.</span> <span class="p">(</span><span class="nf">insert-sort</span> <span class="nv">l</span><span class="p">)</span> </span><span id="L-6"><a name="L-6"></a><span class="mi">6</span><span class="o">.</span> <span class="p">(</span><span class="nf">arg-count</span> <span class="nv">a1</span> <span class="nv">a2</span><span class="o">...</span> <span class="p">)</span> </span></pre></div> </td></tr></table>
scheme
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.