Search code examples
lispracket

Lisp in Small Pieces. chapter 1


I began to study the book "Lisp in Small Pieces". For examples, the selected Racket. But in the first chapter there is a code sample (if (atom? e) . What is "atom?"? Where to define it?


Solution

  • The Scheme standard does not define atom?; the usual definition is

    (define (atom? x) 
      (and (not (pair? x))
           (not (null? x))))