Map
func Map[T any, R any](slice []T, mapper func(value T, index int, slice []T) R) (mapped []R)
Map allows transforming the values in a slice by executing the given mapper function for each element in the slice. The function is passed the current element, the current index and the slice itself as function arguments.