30 Jan
2010
30 Jan
'10
22:41
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