Update lectures/08-generics/lecture.slide
This commit is contained in:
parent
e6a1932822
commit
ffbc187ac7
1 changed files with 2 additions and 2 deletions
|
@ -332,11 +332,11 @@ Why don't we need explicit type parameters?
|
||||||
*T
|
*T
|
||||||
}
|
}
|
||||||
|
|
||||||
func f[T any, PT Pointer[T]](x T)
|
func f[T any, PT Pointer[T]](p PT)
|
||||||
|
|
||||||
or with inlined constraint
|
or with inlined constraint
|
||||||
|
|
||||||
func foo[T any, PT interface{*T}](x T)
|
func foo[T any, PT interface{*T}](p PT)
|
||||||
|
|
||||||
* When to use generics
|
* When to use generics
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue