1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-29 00:10:21 +02:00

(remove-if, remove-if-not): Fix typo: use

`pred', not `pred?', in the body.
This commit is contained in:
Marius Vollmer 2001-06-14 18:22:25 +00:00
parent 4ff9f8254e
commit 45cf8cd6aa

View file

@ -206,7 +206,7 @@ If found, return that element, otherwise return #f."
Return everything that's left."
(let loop ((l l) (result '()))
(cond ((null? l) (reverse! result))
((pred? (car l)) (loop (cdr l) result))
((pred (car l)) (loop (cdr l) result))
(else (loop (cdr l) (cons (car l) result))))))
(define-public (remove-if-not pred l)
@ -214,7 +214,7 @@ Return everything that's left."
Return everything that's left."
(let loop ((l l) (result '()))
(cond ((null? l) (reverse! result))
((not (pred? (car l))) (loop (cdr l) result))
((not (pred (car l))) (loop (cdr l) result))
(else (loop (cdr l) (cons (car l) result))))))
(define-public (delete-if! pred l)