From: Strigoides Date: Fri, 26 Apr 2013 19:43:05 +0000 (+1200) Subject: Add :TEST keyword arg to ASSOC X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=269a1f7cd23445f3e3f9cd9fd96dbcf0174dd146;p=jscl.git Add :TEST keyword arg to ASSOC --- diff --git a/src/boot.lisp b/src/boot.lisp index de32e75..45a8809 100644 --- a/src/boot.lisp +++ b/src/boot.lisp @@ -552,9 +552,9 @@ (incf pos)) pos)) -(defun assoc (x alist) +(defun assoc (x alist &key (test #'eql)) (while alist - (if (eql x (caar alist)) + (if (funcall test x (caar alist)) (return) (setq alist (cdr alist)))) (car alist))