Usually, you'll want to exclude the empty list too:
(define (atom? x) (not (or (pair? x) (null? x))))
or, if you want to be more pedantic, then forbid vectors too:
(define (atom? x) (not (or (pair? x) (null? x) (vector? x))))
And of course you can add much more here -- since it's marked as a racket question, you might want to add hash tables, structs, etc etc. So it can just as well be easier to specify the kinds of values that you do consider as atoms:
(define (atom? x)
(ormap (lambda (p) (p x)) (list number? symbol? boolean? string?)))
or using the racket contract system:
(define atom? (or/c number? symbol? boolean? string?))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…