Logo

Programming-Idioms

History of Idiom 218 > diff from v12 to v13

Edit summary for version 13 by programming-idioms.org:
[Haskell] Variable names a, b

Version 12

2020-04-28, 21:46:21

Version 13

2020-04-30, 20:18: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
Imports
import Data.List (intersect)
Imports
import Data.List (intersect)
Code
listA `intersect` listB
Code
a `intersect` b