query
On this page

intersectLists

lib.intersectLists

Docs pulled from | This Revision | 34 minutes ago


Intersects list 'list1' and another list (list2).

O(nm) complexity.

Inputs

list1

First list

list2

Second list

Examples

lib.lists.intersectLists usage example

intersectLists [ 1 2 3 ] [ 6 3 2 ]
=> [ 3 2 ]
(lib.lists.intersectLists)

Noogle detected

Aliases

Implementation

The following is the current implementation of this function.

intersectLists = e: filter (x: elem x e);