Hacker News new | ask | show | jobs
by philh 6660 days ago
Union seems to be implemented in clisp by copying the second set, and adding to the copy any elements from the first set that aren't in the second. If there's a duplicate in the first set, they both get added because it's the original of the second set that gets tested against rather than the copy.

So (union '(a b) '(a a)) gives (b a a).