content/why-generics: fix ReverseAndPrint
Reverse has no return value.
Change-Id: I400652e98c993555c25c3c7649518e66bfc3e9e7
Reviewed-on: https://go-review.googlesource.com/c/blog/+/188380
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/content/why-generics.article b/content/why-generics.article
index 682080b..b359cf1 100644
--- a/content/why-generics.article
+++ b/content/why-generics.article
@@ -375,7 +375,8 @@
type.
func ReverseAndPrint(s []int) {
- fmt.Println(Reverse(int)(s))
+ Reverse(int)(s)
+ fmt.Println(s)
}
That is the `(int)` seen after `Reverse` in this example.
@@ -387,7 +388,8 @@
Calling a generic function just looks like calling any other function.
func ReverseAndPrint(s []int) {
- fmt.Println(Reverse(s))
+ Reverse(s)
+ fmt.Println(s)
}
In other words, although the generic `Reverse` function is slightly