Combines two arrays removing duplicates. Preserves order with source array elements first, then new elements from other.
union([3, 4])([1, 2, 3]);// => [1, 2, 3, 4] Copy
union([3, 4])([1, 2, 3]);// => [1, 2, 3, 4]
Element type
Array to combine with
Combined array with unique elements
Combines two arrays removing duplicates. Preserves order with source array elements first, then new elements from other.
Example