Logo

Programming-Idioms

History of Idiom 218 > diff from v20 to v21

Edit summary for version 21 by yvendruscolo:
New Clojure implementation by user [yvendruscolo]

Version 20

2020-08-10, 12:37:11

Version 21

2021-01-18, 14:10:12

Idiom #218 List intersection

Create list c containing all unique elements that are contained in both lists a and b.
c should not contain any duplicates, even if a and b do.
The order of c doesn't matter.

Idiom #218 List intersection

Create list c containing all unique elements that are contained in both lists a and b.
c should not contain any duplicates, even if a and b do.
The order of c doesn't matter.

Extra Keywords
intersect and conjunction
Extra Keywords
intersect and conjunction
Code
(def c (clojure.set/intersection (set a) (set b)))