Logo

Programming-Idioms

History of Idiom 218 > diff from v11 to v12

Edit summary for version 12 by Lalla:
New Haskell implementation by user [Lalla]

Version 11

2020-03-17, 13:45:03

Version 12

2020-04-28, 21:46:21

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
Imports
import Data.List (intersect)
Code
listA `intersect` listB