package xslices
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/xslices"
Index ¶
- func Diff[T any](from, to []T, cmp func(lhs, rhs T) int) (steady, added, dropped []T)
- func Filter[T any](in []T, filter func(t T) bool) (out []T)
- func Keys[Key cmp.Ordered, T any](m map[Key]T) []Key
- func Map[Key comparable, T any](x []T, key func(t T) Key) map[Key]T
- func SortCopy[T any](in []T, cmp func(lhs, rhs T) int) (out []T)
- func Split[T any](x []T, isOk func(t T) bool) (good, bad []T)
- func Transform[T1, T2 any](in []T1, f func(t T1) T2) (out []T2)
- func Uniq[T cmp.Ordered](in []T) (out []T)
Functions ¶
func Diff ¶
func Filter ¶
func Keys ¶
func Map ¶
func Map[Key comparable, T any](x []T, key func(t T) Key) map[Key]T
func SortCopy ¶
func Split ¶
func Transform ¶
func Transform[T1, T2 any](in []T1, f func(t T1) T2) (out []T2)
func Uniq ¶
Source Files ¶
diff.go filter.go keys.go map.go sort_copy.go split.go transform.go uniq.go
- Version
- v3.99.9
- Published
- Feb 12, 2025
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 20 minutes ago –
Tools for package owners.