From 31f9fc1657de176780b247f49252a79efe72a01a Mon Sep 17 00:00:00 2001 From: Alfredo Beaumont Date: Sun, 12 May 2013 13:59:17 +0200 Subject: [PATCH] sublis: take sanity check out of recursive function --- src/list.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/list.lisp b/src/list.lisp index 45aee57..9a445db 100644 --- 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) -- 1.7.10.4