;; intersect
;; Retourne la liste des éléments communs à l1 et l2
;;
;; Arguments
;; l1 : une liste
;; l2 : une liste
(defun intersect (l1 l2)
(if l1
(if (member (car l1) l2)
(cons (car l1) (intersect (cdr l1) l2))
(intersect (cdr l1) l2)
)
)
)
I'm a big fan of separating code and data. When data isn't in the code you can have a non-coder do the data entry while you work on something they can't. You can keep the code in a locked down/read-only location and multiple data files in multiple folders which may or may not be read-only, and may have different contents varying by client or project. Makes debugging code easier, as you don't have to jump through pages of data trying to find that particular spot in the code. And on, and on, and on...