subtractLists
lib.subtractLists
Docs pulled from | This Revision | 10 minutes ago
Subtracts list 'e' from another list (list2
).
O(nm) complexity.
Inputs
e
-
First list
list2
-
Second list
Examples
lib.lists.subtractLists
usage example
subtractLists [ 3 2 ] [ 1 2 3 4 5 3 ]
=> [ 1 4 5 ]
Noogle detected
Implementation
The following is the current implementation of this function.
subtractLists = e: filter (x: !(elem x e));