equal?   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/init.xtm

Implementation

;;;;    equal?
(define (equal? x y)
  (cond
   ((pair? x)
    (and (pair? y)
         (equal? (car x) (car y))
         (equal? (cdr x) (cdr y))))
   ((vector? x)
    (and (vector? y) (vector-equal? x y)))
   ((string? x)
    (and (string? y) (string=? x y)))
   (else (eqv? x y))))


Back to Index

Similar Entries