diff --git a/contrib/40.srfi/srfi/1.scm b/contrib/40.srfi/srfi/1.scm index 8859b06b..7a849071 100644 --- a/contrib/40.srfi/srfi/1.scm +++ b/contrib/40.srfi/srfi/1.scm @@ -315,8 +315,7 @@ (let rec ((clist clist) (cont values)) (if (null? clist) (cont knil) - (let ((tail (map cdr clists))) - (rec tail (lambda (x) (cont (kons clist x))))))) + (rec (cdr clist) (lambda (x) (cont (kons clist x)))))) (let rec ((clists (cons clist clists)) (cont values)) (if (every pair? clists) (let ((tail (map cdr clists))) @@ -497,11 +496,11 @@ (define (any pred clist . clists) (if (null? clists) (let rec ((clist clist)) - (if (pair? clist) + (and (pair? clist) (or (pred (car clist)) (rec (cdr clist))))) (let rec ((clists (cons clist clists))) - (if (every pair? clists) + (and (every pair? clists) (or (apply pred (map car clists)) (rec (map cdr clists))))))) @@ -510,11 +509,11 @@ (if (null? clists) (let rec ((clist clist)) (or (null? clist) - (if (pred (car clist)) + (and (pred (car clist)) (rec (cdr clist))))) (let rec ((clists (cons clist clists))) (or (any null? clists) - (if (apply pred (map car clists)) + (and (apply pred (map car clists)) (rec (map cdr clists)))))))) (define (list-index pred clist . clists)