aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-01-21 14:23:21 -0800
committerIan Lance Taylor <iant@golang.org>2022-01-21 22:24:27 +0000
commit8b5daebee3198c7b6265b40c06b077be5e4c5b4b (patch)
tree10f984683f41809c1e41ae60d205b26083df74bb
parent4fe2f9757f17bb5375d474f505076afb7afdbbad (diff)
downloadgo-x-proposal-8b5daebee3198c7b6265b40c06b077be5e4c5b4b.tar.xz
design/43651-type-parameters: return address in List[T].Range
Thanks to Manlio Perillo for pointing this out. Change-Id: I6df29da2810362a6ba51635afbfbe3ab20a010f0 Reviewed-on: https://go-review.googlesource.com/c/proposal/+/379919 Trust: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-rw-r--r--design/43651-type-parameters.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/design/43651-type-parameters.md b/design/43651-type-parameters.md
index ac9219b..ef99dbd 100644
--- a/design/43651-type-parameters.md
+++ b/design/43651-type-parameters.md
@@ -3784,7 +3784,7 @@ type Iterator[T any] struct {
// Range returns an Iterator starting at the head of the list.
func (lst *List[T]) Range() *Iterator[T] {
- return Iterator[T]{next: &lst.head}
+ return &Iterator[T]{next: &lst.head}
}
// Next advances the iterator.