Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Intersection ¶
func Intersection[T comparable](a, b []T) []T
Intersection returns a new slice with the common elements between a and b.
func RandomElement ¶
RandomElement returns a random element from the slice, and a boolean indicating whether the slice was empty.
func Subtract ¶
func Subtract[T comparable](a, b []T) []T
Subtract removes all the items in b from a.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.