Documentation ¶
Index ¶
- func Difference[S ~[]T, T comparable](s1, s2 S) S
- func First[S ~[]E, E any](s S) (E, bool)
- func Flatten[S ~[][]T, T any](s S) []T
- func Map[S ~[]T, O ~[]R, T, R any](s S, mapper func(T) R) O
- func ToMap[S ~[]T, O ~map[V]R, T, R, V comparable](s S, kMapper func(T) V, vMapper func(T) R) O
- func ToSet[S ~[]T, T comparable](s S) map[T]struct{}
- func ToSetFunc[S ~[]T, T, V comparable](s S, kMapper func(T) V) map[V]struct{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Difference ¶
func Difference[S ~[]T, T comparable](s1, s2 S) S
func ToMap ¶
func ToMap[S ~[]T, O ~map[V]R, T, R, V comparable](s S, kMapper func(T) V, vMapper func(T) R) O
func ToSet ¶
func ToSet[S ~[]T, T comparable](s S) map[T]struct{}
func ToSetFunc ¶
func ToSetFunc[S ~[]T, T, V comparable](s S, kMapper func(T) V) map[V]struct{}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.