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
Function: union
Type: Eq a => [a] -> [a] -> [a]
Description: list union
Related: (\\), delete, deleteBy, intersect, intersectBy, unionBy

Example 1

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

Output: [1,2,3,4,5,6]

Example 2

Input: union [1,2,3] [3,2,1,0]

Output: [1,2,3,0]

Example 3

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

Output: [1,2,2,3]

Example 4

Input: union "abcd" "AaBbCcDdEe"

Output: "abcdABCDEe"