This commit is contained in:
2026-01-28 17:33:00 +03:00
parent c8814ca9ff
commit c7bc036d00
9 changed files with 357 additions and 270 deletions

9
utils.go Normal file
View File

@@ -0,0 +1,9 @@
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
}