Map applies f to each element of input, returning the mapped result. Map always uses at most runtime.GOMAXPROCS goroutines. For a configurable goroutine limit, use a custom Mapper.
(input []T, f func(*T) R)
| 18 | // Map always uses at most runtime.GOMAXPROCS goroutines. For a configurable |
| 19 | // goroutine limit, use a custom Mapper. |
| 20 | func Map[T, R any](input []T, f func(*T) R) []R { |
| 21 | return Mapper[T, R]{}.Map(input, f) |
| 22 | } |
| 23 | |
| 24 | // Map applies f to each element of input, returning the mapped result. |
| 25 | // |