Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Concat ¶ added in v0.3.0
func Concat[T any](slices ...[]T) []T
Concat concatenates multiple slices together into a single slice. The input slices are not modified, order is preserved and the returned slice is exactly sized to hold its elements.
func Diff ¶
func Diff[T comparable](a, b []T) []T
Diff returns `a` with all elements occurring in `b` removed.
func Sum ¶ added in v0.7.0
func Sum[N constraints.Integer | constraints.Float | constraints.Complex](s []N) N
Sum all entries in a slice together.
func Unique ¶
func Unique[T comparable](a []T) []T
Unique returns `a` with all duplicate elements removed. Order is preserved.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.