<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Figured it out, thanks for all the help Matthias.<br><br>--- On <b>Tue, 11/30/10, Matthias Felleisen <i><matthias@ccs.neu.edu></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Matthias Felleisen <matthias@ccs.neu.edu><br>Subject: Re: [racket] Missionaries and cannibals<br>To: "Ken Hegeland" <hegek87@yahoo.com><br>Cc: users@lists.racket-lang.org<br>Date: Tuesday, November 30, 2010, 11:12 PM<br><br><div class="plainMail"><br>On Nov 30, 2010, at 4:09 PM, Ken Hegeland wrote:<br><br>> In the book it said that generally an accumulator should be added after completing the function, is it not possible without one, or is it just very difficult?<br><br><br>It says that for STRUCTURALLY RECURSIVE FUNCTIONS you can usually get away w/o an accumulator. But it is easier to
formulate certain problems with accumulators. <br><br>Solving a puzzle where you can easily generate an infinite sequence of 'boat trips' that correspond to an infinite loop in computing implies that you are looking at a GENERATIVE RECURSIVE FUNCTION. <br><br>Next: <br> one step with the introduction of accumulators is to exploit the knowledge that is accumulated. <br> This may mean checking for cycles in a graph or cycles in boat trips. <br><br>Try that -- Matthias<br><br></div></blockquote></td></tr></table><br>