Hey LISPers. I'm using Scheme. Please don't kill me.
I have a question that I can't seem to answer. Here's the code:
(define final '())
(cond ( (< frst scnd) (define final (cons final frst)) (define final (cons final scnd)) ) This is what it's supposed to mean: First, final is defined to null. We have a condition statement. It states....
If first is less than second, define final by concatenating the variable first to the end of final then, define final by concatenating the variable second to the end of final. Of course, it gives me the following error: define: not allowed in an expression context in: (define final (cons final first)) Any idea why, and how to fix it? :\ Thanks. Current Location: angry
|