projects
/
jscl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rewrite MEMBER using SATISFIES-TEST-P
[jscl.git]
/
src
/
list.lisp
diff --git
a/src/list.lisp
b/src/list.lisp
index
96a3594
..
a41d821
100644
(file)
--- a/
src/list.lisp
+++ b/
src/list.lisp
@@
-200,9
+200,10
@@
(and (consp (cdr x))
(cons (car x) (butlast (cdr x)))))
(and (consp (cdr x))
(cons (car x) (butlast (cdr x)))))
-(defun member (x list &key (key #'identity) (test #'eql))
+(defun member (x list &key key (test #'eql testp) (test-not #'eql test-not-p))
(while list
(while list
- (when (funcall test x (funcall key (car list)))
+ (when (satisfies-test-p x (car list) :key key :test test :testp testp
+ :test-not test-not :test-not-p test-not-p)
(return list))
(setq list (cdr list))))
(return list))
(setq list (cdr list))))