]> Cypherpunks repositories - gostls13.git/commitdiff
spec: fix typo in a type parameter example
authorVRDighe <vaibhav@plgworks.com>
Wed, 14 Sep 2022 04:25:55 +0000 (04:25 +0000)
committerRobert Griesemer <gri@google.com>
Tue, 20 Sep 2022 15:50:36 +0000 (15:50 +0000)
Fixes #54973

Change-Id: Ibad9dd124617a1bbc23abd17cbd6e9e9928e3ed9
GitHub-Last-Rev: 1c6affb967ef925ec12420e31c6423a615f90acc
GitHub-Pull-Request: golang/go#55021
Reviewed-on: https://go-review.googlesource.com/c/go/+/430316
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

doc/go_spec.html

index 764dcd2f787aaaca5beedce807a5d28a45119de5..ff75190bb7994ab53f2f2152546bb4383ccc9cd5 100644 (file)
@@ -4265,7 +4265,7 @@ to be inferred. Loosely speaking, type arguments may be omitted from "right to l
 </p>
 
 <pre>
-func apply[S ~[]E, E any](s S, f(E) E) S { … }
+func apply[S ~[]E, E any](s S, f func(E) E) S { … }
 
 f0 := apply[]                  // illegal: type argument list cannot be empty
 f1 := apply[[]int]             // type argument for S explicitly provided, type argument for E inferred