This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Union of two lists

2 posts · 1128 views

Hi Everybody,

I am quite new to this forum and also i am university student (first) year. so i am doing any mistake in asking question please forgive me.
how will we union two lists in a way that the elements that are repeated in the list will come only once in the new union list????

Re: Union of two lists

(remove-duplicates (union '(1 1 2 3) '(2 2 3 4)))
=> (1 2 3 4)