func MapSlice[T](f func(T) T, list []T) []T { result := make([]T, len(list)) for i, val := range list { result[i] = f(val) } return result }