package slog func Map[T, R any](s []T, f func(T) R) []R { out := make([]R, len(s)) for i, el := range s { out[i] = f(el) } return out }