Back to Lo

It Concat

docs/data/it-concat.md

1.53.0311 B
Original Source

Returns a sequence of all the elements in iterators. Concat conserves the order of the elements.

go
list1 := slices.Values([]int{0, 1, 2})
list2 := slices.Values([]int{3, 4, 5})
list3 := slices.Values([]int{6, 7, 8})

result := it.Concat(list1, list2, list3)

// result: []int{0, 1, 2, 3, 4, 5, 6, 7, 8}