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

Consider type inference for this call. What happens?

func Pair[T any](a, b T) [2]T { return [2]T{a, b} } func main() { p := Pair(1, 2.0) fmt.Println(p) }