[Solved] creating assoc function in lisp that will find value from a-list
The most basic lisp operations are list eaters: (defun some-function (list-to-consume perhaps-additional-args) (cond ((endp list-to-consume) <end-of-list-expression>) ((<predicate> list-to-consume perhaps-additional-args) <result-expression>) (t (some-function (cdr list-to-consume) perhaps-additional-args)))) Examples: ;; The predicate is the endp expression (defun mylength (list &optional (len 0)) (cond ((endp list) len) (t (mylength (cdr list) (1+ len))))) ;; A member function (defun mymember … Read more