mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 06:39:17 +02:00
core any should work on improper lists.
This commit is contained in:
parent
524edc0660
commit
2247580fa7
1 changed files with 3 additions and 3 deletions
|
@ -72,9 +72,9 @@
|
||||||
|
|
||||||
(define (any pred ls . lol)
|
(define (any pred ls . lol)
|
||||||
(define (any1 pred ls)
|
(define (any1 pred ls)
|
||||||
(if (null? (cdr ls))
|
(if (pair? (cdr ls))
|
||||||
(pred (car ls))
|
((lambda (x) (if x x (any1 pred (cdr ls)))) (pred (car ls)))
|
||||||
((lambda (x) (if x x (any1 pred (cdr ls)))) (pred (car ls)))))
|
(pred (car ls))))
|
||||||
(define (anyn pred lol)
|
(define (anyn pred lol)
|
||||||
(if (every pair? lol)
|
(if (every pair? lol)
|
||||||
((lambda (x) (if x x (anyn pred (map cdr lol))))
|
((lambda (x) (if x x (anyn pred (map cdr lol))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue