t3x.org / sketchy / library / zerop.html
SketchyLISP
Reference
  Copyright (C) 2007
Nils M Holm

zero?

Conformance: R5RS Scheme

Purpose: Test whether a number is zero.

Arguments:
X - number

Model:

(define (zero? x)
  (= x 0))

Implementation:

(define (zero? x)
  (letrec
    ((zerop
       (lambda (list-x)
         (cond ((eq? (car list-x) 0d)
             (null? (cdr list-x)))
           (else (= x 0))))))
    (zerop (integer->list x))))

Example:

(zero? 0) 
=> #t

See also:
digits, even?, negative?, positive?.