Back to Lo

Core Findduplicates

docs/data/core-findduplicates.md

1.53.0174 B
Original Source

Returns a slice with the first occurrence of each duplicated element in the collection, preserving order.

go
lo.FindDuplicates([]int{1, 2, 2, 1, 2, 3})
// []int{1, 2}