slicesx

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 0 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL