Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumGogenerics type parametersSingle-choice MCQ

Why does this call to the generic function not compile?

func Zeros[T any](n int) []T { return make([]T, n) } func main() { xs := Zeros(3) _ = xs }