Documentation
¶
Overview ¶
Package slicesx extends the standard slices package with transforms it deliberately omits (the Map/Filter family lives in third-party libs; only what real projects actually repeat earns a slot here).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Uniq ¶
func Uniq[T comparable](s []T) []T
Uniq returns s without duplicates, keeping the FIRST occurrence and the original order — the "seen map" loop every codebase keeps re-writing.
func UniqBy ¶
func UniqBy[T any, K comparable](s []T, key func(T) K) []T
UniqBy returns s without key-duplicates, keeping the first occurrence of each key and the original order.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.