Re: [racket] Code Error Creating List

2011-05-18 Thread Marco Morazan
On Wed, May 18, 2011 at 5:50 PM, Todd Dobmeyer wrote: > > As far as Marco's comments earlier, I should have one function to handle > parsing the list, and upon finding an expression, pass it to the procedure > that handles expressions instead of trying to handle it all in the same > procedure. Thi

Re: [racket] Code Error Creating List

2011-05-18 Thread Todd Dobmeyer
Thanks for this explanation. I had not seen this error before as I am new to Scheme. I think I understand what it is saying now. With the double ()s it assumes the inner set is a procedure. I am sorry my code looks so poorly, I have been doing C/C++ almost exclusively for 10 years and I get co

Re: [racket] Code Error Creating List

2011-05-18 Thread Danny Yoo
On Tue, May 17, 2011 at 8:03 PM, Todd Dobmeyer wrote: > I am taking a class at Wright State University and we are working on problem > 3.27 from the EOPL 2nd Edition Have you seen the error message before, and do you know what it means? Here's an example of a program that generates a similar e

Re: [racket] Code Error Creating List

2011-05-18 Thread Marco Morazan
Todd, In addition to Matthias' observations: > (define free-vars-list > (lambda (body) >( > (if (list? body) (append (free-vars-list (car body)) (free-vars-list > (cdr body))) > (cases expression body > ;; When we have a var-exp, return the

Re: [racket] Code Error Creating List

2011-05-17 Thread Matthias Felleisen
Todd D: 1. This code must be the worst formatted Racket code I have seen in a long time. Please read EOPL and follow its example. 2. Next, when DrRacket tells you that a particular sub-expression in your program raised an error, please -- pretty please -- pay attention. I removed the superf

Re: [racket] Code Error Creating List

2011-05-17 Thread Todd Dobmeyer
Todd Thanks, you are definitely making me think, but I don't see what would be wrong with what I am trying. The first thing I tried was to remove free-vars and just call free-vars-list directly and change the case of (var-exp (id) id) to (var-exp (id) (list id)) ;; in this example id == x s

Re: [racket] Code Error Creating List

2011-05-17 Thread Todd O'Bryan
I apologize in advance for not actually reading through your code beyond the point where it began using constructs that I'm not familiar with, but I will give some advice that may or may not be helpful. You're trying to return '(x). What you're actually returning is (x)--an application of the valu