(list=): Correction to arguments passed to given elt=,
authorKevin Ryde <user42@zip.com.au>
Thu, 3 Feb 2005 23:18:59 +0000 (23:18 +0000)
committerKevin Ryde <user42@zip.com.au>
Thu, 3 Feb 2005 23:18:59 +0000 (23:18 +0000)
spec is (elt= e[i] e[i+1]) for lists i and i+1, previously the first
arg was always from list 0 not list i.

srfi/srfi-1.scm

index d67b705..1004cd5 100644 (file)
             (and (elt= (car a) (car b))
                  (lp (cdr a) (cdr b)))))))
   (or (null? rest)
-      (let ((first (car rest)))
-       (let lp ((lists rest))
-         (or (null? lists)
-             (and (lists-equal first (car lists))
-                  (lp (cdr lists))))))))
+      (let lp ((lists rest))
+       (or (null? (cdr lists))
+           (and (lists-equal (car lists) (cadr lists))
+                (lp (cdr lists)))))))
 
 ;;; Selectors