Documentation
¶
Overview ¶
Package lang provides some helpful or at least amusing language features not included in the standard Go language or libraries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Filter ¶ added in v0.0.7
func Filter[A comparable](input []A, items ...A) []A
Filter removes the list of items from input.
Note that Filter yields a deep copy.
func FilterFunc ¶ added in v0.0.7
FilterFunc uses f to remove elements from input. If f returns true for an element, that element is not included in the result.
Note that FilterFunc creates a deep copy.
func Head ¶ added in v0.0.5
Head returns up to the first count elements in the given input slice.
Note that this is yields a shallow copy.
func Map ¶ added in v0.0.3
func Map[A, B any](input []A, f func(A) B) []B
Map applies function f to every A element in input to create a new slice of type B.
Types ¶
Click to show internal directories.
Click to hide internal directories.