xslices

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Difference

func Difference[S ~[]T, T comparable](s1, s2 S) S

func First

func First[S ~[]E, E any](s S) (E, bool)

func Flatten

func Flatten[S ~[][]T, T any](s S) []T

func Map

func Map[S ~[]T, O ~[]R, T, R any](s S, mapper func(T) R) O

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.

Jump to

Keyboard shortcuts

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