[racket] Some guidance and help for Section 4.5.1

From: Da Gamer (game_beta2003 at yahoo.com)
Date: Sun Apr 28 01:35:02 EDT 2013

First, I'm working on problem: How To Design Programs, 2nd Edition (Chapter 4, Section 4.5.1).
 
Second, I'm self-learning.
 
Now, I've made two attempts at this problem. First and Second.
 My issue is that I know I'm doing something wrong. But I don't know 
what it is. My process of going through the problem is jacked somehow. 
In the first attempt, the code looks like right. I'm using recursion, 
following the steps the book has laid out (to the best of my 
understanding). But the result produced is the answer plus junk. In the 
second attempt, there is some recursion and helper functions. And the 
answers are correct. However, the code feels .... wrong. As if I didn't 
do it the Scheme way. It's like writing C with classes and not idiomatic
 C++. It works, but it's wrong.
 
So any tips, hints, pointing in the right direction, would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130427/15e2199d/attachment.html>

Posted on the users mailing list.