- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for intSum (0.04 sec)
-
doc/go_spec.html
func sum[T ~int | ~float64 | ~string](x... T) T { … } x := sum // illegal: the type of x is unknown intSum := sum[int] // intSum has type func(x... int) int a := intSum(2, 3) // a has value 5 of type int b := sum[float64](2.0, 3) // b has value 5.0 of type float64 c := sum(b, -1) // c has value 4.0 of type float64
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Tue May 06 19:12:15 UTC 2025 - 286.2K bytes - Viewed (0)