mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 01:30:27 +02:00
(scheme base) member: return #f, not (), for no match
* module/scheme/base.scm (member): Match the r7rs requirement, as assoc already does. Thanks to Erik Dominikus for reporting the problem. Closes: 43304
This commit is contained in:
parent
7a1cd29637
commit
f1547e1d58
3 changed files with 7 additions and 4 deletions
|
@ -129,9 +129,10 @@
|
|||
(unless (procedure? =)
|
||||
(error "not a procedure" =))
|
||||
(let lp ((ls ls))
|
||||
(if (or (null? ls) (= (car ls) x))
|
||||
ls
|
||||
(lp (cdr ls)))))))
|
||||
(cond
|
||||
((null? ls) #f)
|
||||
((= (car ls) x) ls)
|
||||
(else (lp (cdr ls))))))))
|
||||
|
||||
(define* (assoc x ls #:optional (= equal?))
|
||||
(cond
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue