Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForEach ¶
func ForEach[T any](input []T, f func(*T))
ForEach executes f in parallel over each element in input.
It is safe to mutate the input parameter, which makes it possible to map in place.
ForEach always uses at most runtime.GOMAXPROCS goroutines. It takes roughly 2µs to start up the goroutines and adds an overhead of roughly 50ns per element of input.
func ForEachIdx ¶
ForEachIdx is the same as ForEach except it also provides the index of the element to the callback.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.