Re: [racket] Missionaries and cannibals

2010-12-01 Thread Ken Hegeland
Figured it out, thanks for all the help Matthias. --- On Tue, 11/30/10, Matthias Felleisen wrote: From: Matthias Felleisen Subject: Re: [racket] Missionaries and cannibals To: "Ken Hegeland" Cc: us...@lists.racket-lang.org Date: Tuesday, November 30, 2010, 11:12 PM On Nov 30, 201

Re: [racket] Missionaries and cannibals

2010-12-01 Thread Ken Hegeland
figure out a way to produce false. --- On Tue, 11/30/10, Matthias Felleisen wrote: From: Matthias Felleisen Subject: Re: [racket] Missionaries and cannibals To: "Ken Hegeland" Cc: us...@lists.racket-lang.org Date: Tuesday, November 30, 2010, 2:08 PM Ken, you have not absorbed t

Re: [racket] Missionaries and cannibals

2010-11-30 Thread Matthias Felleisen
On Nov 30, 2010, at 4:09 PM, Ken Hegeland wrote: > 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? It says that for STRUCTURALLY RECURSIVE FUNCTIONS you can usually get away w/o

Re: [racket] Missionaries and cannibals

2010-11-30 Thread Ken Hegeland
gal also return false if input matches some item in history. This would allow me to filter out all illegal moves and previously seen moves. --- On Tue, 11/30/10, Matthias Felleisen wrote: From: Matthias Felleisen Subject: Re: [racket] Missionaries and cannibals To: "Ken Hegelan

Re: [racket] Missionaries and cannibals

2010-11-30 Thread Matthias Felleisen
ind the solution. > > --- On Tue, 11/30/10, Matthias Felleisen wrote: > > From: Matthias Felleisen > Subject: Re: [racket] Missionaries and cannibals > To: "Ken Hegeland" > Cc: us...@lists.racket-lang.org > Date: Tuesday, November 30, 2010, 3:19 AM > > > 1

Re: [racket] Missionaries and cannibals

2010-11-29 Thread Stephen Bloch
On Nov 29, 2010, at 10:30 PM, Ken Hegeland wrote: I've almost managed to create mc-solvable as the book wants it. I originally designed it to take a list of states, and I changed it to accept a list of states, list of(listof states), or a single state. That's almost certainly a bad idea.

Re: [racket] Missionaries and cannibals

2010-11-29 Thread Ken Hegeland
on. --- On Tue, 11/30/10, Matthias Felleisen wrote: From: Matthias Felleisen Subject: Re: [racket] Missionaries and cannibals To: "Ken Hegeland" Cc: us...@lists.racket-lang.org Date: Tuesday, November 30, 2010, 3:19 AM 1. Your sketch sounds about right. The problem is probably sticking to

Re: [racket] Missionaries and cannibals

2010-11-29 Thread Matthias Felleisen
1. Your sketch sounds about right. The problem is probably sticking to the discipline of turning it into code. 2. The infinite loop is troubling -- but looking at your code is the wrong thing. The goal is to empower yourself so that you can do such things on your own w/o help from others. H

[racket] Missionaries and cannibals

2010-11-29 Thread Ken Hegeland
The exercise can be found at:http://htdp.org/2003-09-26/Book/curriculum-Z-H-40.html#node_sec_32.2 I am stuck at 32.2.6-.7 I originally had some information incorrect and was able to get mc-solution working correctly, except it didn't need someone to remain on the boat at all times. So it just