diff options
| author | Ian Lance Taylor <iant@golang.org> | 2020-06-19 17:15:59 -0700 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2020-06-20 00:51:27 +0000 |
| commit | 8c812660ccf607f10cb5f91b00fa11c51d96f8a5 (patch) | |
| tree | fcf336e500903249ded48fed67ba2574e4a3b7ef | |
| parent | e615bd6b4b9a94bdb78256012fbce61dd67159b4 (diff) | |
| download | go-x-proposal-8c812660ccf607f10cb5f91b00fa11c51d96f8a5.tar.xz | |
design/go2draft-type-parameters: fix typo
Change-Id: If7434b7d2a111812047fd9c9cb95ff65aa2c50db
Reviewed-on: https://go-review.googlesource.com/c/proposal/+/239157
Reviewed-by: Robert Griesemer <gri@golang.org>
| -rw-r--r-- | design/go2draft-type-parameters.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/design/go2draft-type-parameters.md b/design/go2draft-type-parameters.md index 5b4a344..fe39f1c 100644 --- a/design/go2draft-type-parameters.md +++ b/design/go2draft-type-parameters.md @@ -2422,7 +2422,7 @@ types of the non-type arguments. s := []int{1, 2, 3} floats := slices.Map(s, func(i int) float64 { return float64(i) }) - // Now float2 is []float64{1.0, 2.0, 3.0}. + // Now floats is []float64{1.0, 2.0, 3.0}. sum := slices.Reduce(s, 0, func(i, j int) int { return i + j }) // Now sum is 6. @@ -2442,7 +2442,7 @@ package maps // Keys returns the keys of the map m in a slice. // The keys will be returned in an unpredictable order. // This function has two type parameters, K and V. -// Map keys must be comparable, so key has the predeclared +// Map keys must be comparable, so key has the predeclared // constraint comparable. Map values can be any type; // the empty interface type imposes no constraints. func Keys(type K comparable, V interface{})(m map[K]V) []K { |
