package xslices

import "github.com/ydb-platform/ydb-go-sdk/v3/internal/xslices"

Index

Functions

func Diff

func Diff[T any](from, to []T, cmp func(lhs, rhs T) int) (steady, added, dropped []T)

func Filter

func Filter[T any](in []T, filter func(t T) bool) (out []T)

func Keys

func Keys[Key cmp.Ordered, T any](m map[Key]T) []Key

func Map

func Map[Key comparable, T any](x []T, key func(t T) Key) map[Key]T

func SortCopy

func SortCopy[T any](in []T, cmp func(lhs, rhs T) int) (out []T)

func Split

func Split[T any](x []T, isOk func(t T) bool) (good, bad []T)

func Transform

func Transform[T1, T2 any](in []T1, f func(t T1) T2) (out []T2)

func Uniq

func Uniq[T cmp.Ordered](in []T) (out []T)

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.