On 21.12.2011 14:38, wrote haziz:
> I am trying to start the "Little Schemer" book and input the define
> atom definition fromthe preface into DrRacket (language selected R5RS):
>
> (define atom?
> (lambda (x)
> (and (not pair? x)) (not (null? x))))
>
> I was unable to get the confirmatory #f to (atom? (quote ())).
>
What did you get instead? That is generally just as important as what
one didn't get.
> What am I doing wrong?
>
There are important parentheses missing, either already in the original,
or they got lost when transcribing.
The 'not' procedure takes 1 argument, you are giving it 2.
--
Jake Jarvis