;; | --------------------------------------------------------------------------- ;; | LI_Union ;; | --------------------------------------------------------------------------- ;; | Function : Performs a union of two lists ;; | Arguments: ;; | 'Lst1' - First List ;; | 'Lst2' - Second List ;; | Action : Returns a list which contains all of Lst1 plus any elements in ;; | not contained in Lst1 ;; | Duplicate elements will be added as many times as they occur in ;; | second list ;; | Updated : December 23, 1998 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | --------------------------------------------------------------------------- (defun LI_Union( Lst1 Lst2 / Lst tmp ) (setq Lst '()) (foreach tmp Lst2 (if (not (member tmp Lst1)) (setq Lst (cons tmp Lst)) ) ) (setq Lst (reverse Lst) Lst (append Lst1 Lst) ) Lst )