- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for _DoubleElems2 (0.12 sec)
-
test/typeparam/double.go
r := make(S, len(s)) for i, v := range s { r[i] = v + v } return r } // Test use of untyped constant in an expression with a generically-typed parameter func _DoubleElems2[S _SliceOf[E], E Number](s S) S { r := make(S, len(s)) for i, v := range s { r[i] = v * 2 } return r } func main() { arg := MySlice{1, 2, 3} want := MySlice{2, 4, 6}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 1.5K bytes - Viewed (0)