projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b1ca86
)
sublis: take sanity check out of recursive function
author
Alfredo Beaumont
<alfredo.beaumont@gmail.com>
Sun, 12 May 2013 11:59:17 +0000
(13:59 +0200)
committer
Alfredo Beaumont
<alfredo.beaumont@gmail.com>
Sun, 12 May 2013 11:59:17 +0000
(13:59 +0200)
src/list.lisp
patch
|
blob
|
history
diff --git
a/src/list.lisp
b/src/list.lisp
index
45aee57
..
9a445db
100644
(file)
--- a/
src/list.lisp
+++ b/
src/list.lisp
@@
-100,9
+100,9
@@
(defun cddddr (x) (cdr (cdddr x)))
(defun sublis (alist tree &key key (test #'eql testp) (test-not #'eql test-not-p))
+ (when (and testp test-not-p)
+ (error "Both test and test-not are set"))
(labels ((s (tree)
- (when (and testp test-not-p)
- (error "Both test and test-not are set"))
(let* ((key-val (if key (funcall key tree) tree))
(replace (if test-not-p
(assoc key-val alist :test-not test-not)