On Jan 31, 2008 2:22 AM, David Brown <[EMAIL PROTECTED]> wrote: > On Thu, Jan 31, 2008 at 12:36:01AM -0500, Mark Schoonover wrote: > > >Working through the example in section 1.2.2 to calc out fibonacci > numbers > >doesn't appear to work properly. I've tried it out on drscheme and Edwin > >with the sam results. Anyone else run into the same thing? > > What do you mean by not working properly? Or should I say, which part > isn't working. Perhaps an example of what you're giving to your scheme > system, the results you're getting, and what you expect. > > Don't expect the first definition of fib to be very fast, that's kind of > the point. > > Also, you might not be able to redefine fib to a different value without > exiting and restarting your scheme system. > > David >
David, Well, I think I'm just having a clueless moment... (fib 5) is returning 5, (fib 10) is returning 55. I would think the (fib n) would return the sequence. Maybe I'm just showing my noobness with Scheme too... I do understand the diff between recursion vs iteration, which is the crux of this section. -- Mark Schoonover, CMDBA http://www.linkedin.com/in/markschoonover http://marksitblog.blogspot.com [EMAIL PROTECTED] -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
