; http://cap-lore.com/code/Scheme/equal.html
(lambda (a b)
(let e ((a a)(b b)(h '()))(or (let be ((s h))(and (pair? s)
(or (and (eq? a (caar s))(eq? b (cdar s)))(be (cdr s)))))
(let ((h (cons (cons a b) h))) (or
(eqv? a b)
(and (pair? a)(pair? b) (e (car a)(car b) h)(e (cdr a)(cdr b) h))
(and (vector? a)(vector? b) (let ((k (vector-length a)))(and
(= k (vector-length b))
(let x ((n (- k 1))) (or (negative? n)
(and (e (vector-ref a n)(vector-ref b n) h) (x (- n 1)))))))))))))