Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Map ¶
func Map[In, Out any](s []In, fn func(In) Out) []Out
Map applies a provided function to each element of the given slice, returning a new slice with the results.
func NoZero ¶
func NoZero[S ~[]T, T comparable](s S) S
NoZero removes zero values from the provided slice and returns a new slice containing only non-zero values of the same type. It maintains the order of the original elements.
func Unique ¶
func Unique[S ~[]T, T comparable](s S) S
Unique removes duplicate elements from the provided slice, preserving the order of the first occurrence of each element. It returns a slice containing only the unique elements.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.