PHP » GoLang |
login |
register |
about
|
array_maparray_mapfunc SliceMap[T, M any](input []T, callback func(T) M) []M { output := make([]M, 0, len(input)) for _, val := range input { output = append(output, callback(val)) } return output } |