[gambit-list] newbie question: Little scheme
joe tex
joetex1 at gmail.com
Sat Jan 30 17:41:58 EST 2010
I am a scheme newbie currently reading "The Little Schemer"
The book provides the function for atom as follows.
------- atom.scm----------------
(define atom?
(lambda (x)
(and (not (pair? x)) (not null? x))))
--------------------------------
However when I use it with Gambit, it shows the following error message.
as follows:
----------------------------------------------------
Gambit v4.5.3
> (load "atom.scm")
"/home/joetex/atom.scm"
> (atom? 'h)
*** ERROR IN atom?, "atom.scm"@3.10 -- Wrong number of arguments
passed to procedure
(not '#<procedure #2 pair?> 'h)
1>
----------------------------------------------------
What exactly has gone wrong here?
Please ignore this email if this is the wrong mailing list.
Thank you,
- Joe
More information about the Gambit-list
mailing list