Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](slice []T, value T) bool
Contains returns true if any of the slice elements pass an == test w/ the given 'value'.
func Map ¶
Map performs a functional Map operation where you convert a slice of type T to a slice of type U by running every element through a mapping function.
func Remove ¶
func Remove[T comparable](slice []T, value T) []T
Remove is a generic way to remove the first instance of 'value' from the given slice. If the item does not exist in the slice, you'll get back your input slice as-is. This does not mutate your input slice - it returns a new slice without the value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.