Back to Lo

Core Union

docs/data/core-union.md

1.53.0188 B
Original Source

Returns all distinct elements from given collections while preserving relative order.

go
lo.Union([]int{0, 1, 2, 3, 4, 5}, []int{0, 2}, []int{0, 10})
// []int{0, 1, 2, 3, 4, 5, 10}