Write the function UNION which computes the set theoretic
union of two lists. For example,
(union '(a b c d) '(c a g))
returns the list (a b c d g)
(defun my-union (list1 list2)
(remove-duplicates (append list1 list2) :from-end t))COMMON-LISP-USER>
(my-union '(a b c d) '(c a g))
(A B C D G)

Users browsing this forum: Google [Bot] and 2 guests