Merge https://github.com/Strigoides/jscl into pull-requests
[jscl.git] / src / boot.lisp
index 0af19f4..8ff77d1 100644 (file)
       (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))
                                     (integer 'integerp)
                                     (cons 'consp)
                                     (symbol 'symbolp)
-                                    (string 'stringp)
                                     (array 'arrayp)
+                                    (string 'stringp)
                                     (atom 'atom)
                                     (null 'null))
                              ,value)