add show course and map names
This commit is contained in:
10
internal/common/xslices/map.go
Normal file
10
internal/common/xslices/map.go
Normal file
@ -0,0 +1,10 @@
|
||||
package xslices
|
||||
|
||||
func Map[T, U any](in []T, f func(T) U) []U {
|
||||
out := make([]U, len(in))
|
||||
for i, value := range in {
|
||||
out[i] = f(value)
|
||||
}
|
||||
|
||||
return out
|
||||
}
|
||||
Reference in New Issue
Block a user