(list []T, mapper func(T) U)
| 61 | } |
| 62 | |
| 63 | func Map[T any, U any](list []T, mapper func(T) U) []U { |
| 64 | result := make([]U, len(list)) |
| 65 | for i, v := range list { |
| 66 | result[i] = mapper(v) |
| 67 | } |
| 68 | return result |
| 69 | } |
no outgoing calls
no test coverage detected