Skip to content

Commit

Permalink
update page
Browse files Browse the repository at this point in the history
  • Loading branch information
nadia-polikarpova committed May 10, 2024
1 parent 5d2d069 commit 1d9a502
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/lectures/04-hof.html
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ <h2 id="quiz-2">QUIZ</h2>
<p><strong>B.</strong> <code class="sourceCode haskell">len <span class="ot">=</span> <span class="fu">foldr</span> (\n m <span class="ot">-&gt;</span> n <span class="op">+</span> m) <span class="dv">0</span></code></p>
<p><strong>C.</strong> <code class="sourceCode haskell">len <span class="ot">=</span> <span class="fu">foldr</span> (\_ n <span class="ot">-&gt;</span> n <span class="op">+</span> <span class="dv">1</span>) <span class="dv">0</span></code></p>
<p><strong>D.</strong> <code class="sourceCode haskell">len <span class="ot">=</span> <span class="fu">foldr</span> (\x xs <span class="ot">-&gt;</span> <span class="dv">1</span> <span class="op">+</span> len xs) <span class="dv">0</span></code></p>
<p><strong>E.</strong> All of the above</p>
<p><strong>E.</strong> None of the above</p>
<p><strong>HINT</strong>: remember that <code class="sourceCode haskell"><span class="fu">foldr</span><span class="ot"> ::</span> (a <span class="ot">-&gt;</span> b <span class="ot">-&gt;</span> b) <span class="ot">-&gt;</span> b <span class="ot">-&gt;</span> [a] <span class="ot">-&gt;</span> b</code>!</p>
<p><br>
<br>
Expand Down
2 changes: 1 addition & 1 deletion lectures/04-hof.md
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ Which of these is a valid implementation of `len`

**D.** `len = foldr (\x xs -> 1 + len xs) 0`

**E.** All of the above
**E.** None of the above

**HINT**: remember that `foldr :: (a -> b -> b) -> b -> [a] -> b`!

Expand Down

0 comments on commit 1d9a502

Please sign in to comment.