Page 1 of 1

Union of two lists

Posted: Sun Jan 30, 2011 10:43 am
by ayaz2010
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

Posted: Sun Jan 30, 2011 12:51 pm
by FAU
(remove-duplicates (union '(1 1 2 3) '(2 2 3 4)))
=> (1 2 3 4)