ZVON > References > Haskell reference
| Indexes | Syntax | Prelude | Ratio | Complex | Numeric | Ix | Array | >> List << | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random

Module: List
Operator: (\\)
Type: Eq a => [a] -> [a] -> [a]
Priority: 5
Description: list difference (non-associative)
Related: delete, deleteBy, intersect, intersectBy, union, unionBy

Example 1

Input: [1,2,3,4] \\ [2,3]

Output: [1,4]

Example 2

Input: [1,1,2,2] \\ [2,3]

Output: [1,1,2]

Example 3

Input: [1,1,2,2] \\ [2,2]

Output: [1,1]

Example 4

Input: [1,2,3,4] \\ [1,2,3,4,5,6]

Output: []

Example 5

Input: "abcd" \\ "xabetrhfd"

Output: "c"