intersectLists
lib.lists.intersectLists
Docs pulled from | This Revision | about 1 hour ago
Intersects list list1 and another list (list2).
O(nm) complexity.
Inputs
list1-
First list
list2-
Second list
Type
intersectLists :: [a] -> [a] -> [a]
Examples
lib.lists.intersectLists usage example
intersectLists [ 1 2 3 ] [ 6 3 2 ]
=> [ 3 2 ]
Noogle detected
Implementation
The following is the current implementation of this function.
intersectLists = e: filter (x: elem x e);