I haven&#39;t actually gotten to this exercise yet, but I feel like this is probably related: <a href="http://www.ece.uc.edu/~franco/C511/html/Scheme/ycomb.html">http://www.ece.uc.edu/~franco/C511/html/Scheme/ycomb.html</a>.  I&#39;m not sure if it will give you some pointers in the right direction.  It basically explains how to &quot;abstract out&quot; the recursive part of a function into a separate function, which is basically what you need.<br>
<br><div class="gmail_quote">On Fri, Mar 27, 2009 at 7:21 AM, Michael Mossey <span dir="ltr">&lt;<a href="mailto:mpm@alumni.caltech.edu">mpm@alumni.caltech.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
<br>
Jason White wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Michael Mossey  &lt;<a href="mailto:mpm@alumni.caltech.edu" target="_blank">mpm@alumni.caltech.edu</a>&gt; wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
YAHT has some hard exercises, early on. He introduces continuations in chapter 4, briefly, and then casually asks you to rewrite map and filter  in continuation-passing-style. I was stumped. <br>
</blockquote>
<br>
So am I.<br>
<br>
Do you have any hints for these, without giving the answers away (I know the<br>
answers are in the appendix if I really need them)?<br>
<br>
</blockquote></div>
Well, I&#39;ve got some bad news for you. He doesn&#39;t include the answers to the CPS-related questions. Note: YAHT seems to be incomplete in a number of ways, because there are chapter headings that exist only as stubs. However, it&#39;s a terrific resource, and my thanks to Hal.<br>

<br>
I decided to just move on, and I&#39;ll come back to continuations when I find them in another book.<br>
<br>
Mike<div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br>