mirror of
https://github.com/rjNemo/underscore
synced 2026-06-06 02:26:42 +00:00
Add `ParallelFilter` for concurrent filtering with context and error support. Add `UniqueInPlace` to remove duplicates from slices in place. Update README and add documentation and tests for both functions.
347 B
347 B
| title | date |
|---|---|
| UniqueInPlace | 2025-09-01T00:00:00-00:00 |
UniqueInPlace removes duplicates from a slice in place while preserving order.
Returns the shortened slice.
package main
import (
"fmt"
u "github.com/rjNemo/underscore"
)
func main() {
xs := []int{1,4,2,5,3,1,5,2}
fmt.Println(u.UniqueInPlace(xs)) // [1 4 2 5 3]
}