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

=

Conformance: R5RS

Purpose: Check whether two or more numbers are equal. Return #t, if a=b=... and otherwise #f.

Arguments:
A - number
B... - numbers

Implementation:

(define (= a . b)
  (letrec
    ((eq (lambda (a b)
      (cond ((eq? a #t) #t)
        ((equal? (integer->list (normalize a))
                 (integer->list (normalize b)))
            a)
        (#t #t)))))
    (cond ((null? b)
        (bottom '(too few arguments to =)))
      (#t (neq? (reduce eq (cons a b) #f) #t)))))

Example:

(= 123 123 123) 
=> #t

See also:
<, >, <=, >=, equal?, not.