;; | --------------------------------------------------------------------------- ;; | LI_Intersect ;; | --------------------------------------------------------------------------- ;; | Function : Returns all common elements between the two passed lists ;; | Arguments: ;; | 'Lst1' - First List ;; | 'Lst2' - Second List ;; | Returns : The list of common elements ;; | Updated : December 23, 1998 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | --------------------------------------------------------------------------- (defun LI_Intersect( Lst1 Lst2 / Lst tmp ) (setq Lst '()) (if (or Lst1 Lst2) (progn (foreach tmp Lst1 (if (member tmp Lst2) (setq Lst (cons tmp Lst)) ) ) )) (setq Lst (reverse Lst)) Lst )