slicex

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equivalent added in v0.2.1

func Equivalent[T comparable, E ~[]T](x, y E) bool

Equivalent compares two slices has same elements without order

func M added in v0.3.0

func M[FROM any, TO any, E ~[]FROM](s E, m func(FROM) TO) []TO

M converts ~[]FROM to []TO by mapping function m

func Unique added in v0.2.0

func Unique[T comparable, E ~[]T](s E) E

func UniqueKeys added in v0.2.11

func UniqueKeys[E any, S ~[]E, K comparable](s S, keyOfE func(E) K) []K

UniqueKeys collects partials P from slices S by func keyOfE

func UniqueValues added in v0.2.11

func UniqueValues[E any, S ~[]E, K comparable](s S, keyOfE func(E) K) []E

UniqueValues collects unique []E from slices S by func keyOfE

Types

This section is empty.

Jump to

Keyboard shortcuts

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