From: Jim Pryor Date: Thu, 23 Dec 2010 17:31:28 +0000 (-0500) Subject: ass10 tweaks X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=72cca371a48d35b0177427b35f23ae8cc704fdf2;hp=e5f582330945c265a211cbebb30bc06a94f3ed91 ass10 tweaks Signed-off-by: Jim Pryor --- diff --git a/assignment10.mdwn b/assignment10.mdwn index 087b66a4..d7e0e235 100644 --- a/assignment10.mdwn +++ b/assignment10.mdwn @@ -114,7 +114,7 @@ Of course, if you need help or want us to review your efforts, we'll be glad to What would be a helper function you could supply as a `k` that would report `#t` iff the original `lst` contained more instances of some symbol than non-instances? - + --> 5. Now we define a function `insert-co` which has the following behavior. It accepts as arguments three symbols, a list, and a handler. The first symbol is inserted before (to the left of) any occurrences in the list of the second symbol, and after (to the right of) any occurrences of the third symbol. The handler is then called with three arguments: the new list (with the insertions made), the number of "to-the-left" insertions that were made, and the number of "to-the-right" insertions that were made. @@ -142,7 +142,7 @@ Of course, if you need help or want us to review your efforts, we'll be glad to (else (insert-co new before after (cdr lst) (lambda (new-lst lefts rights) ________)))))) - + --> 6. Go back to the "abSd" problem we presented in [[From List Zippers to Continuations]]. Consider the "tc" solution which uses