[generics] tiny typo in Map/Reduce/Filter examples

89 views
Skip to first unread message

Mark

unread,
Jun 17, 2020, 12:36:01 PM6/17/20
to golang-nuts
At the end of this section where it shows the outputs:
```go
floats := slices.Map(s, func(i int) float64 { return float64(i) })
// Now float2 is []float64{1.0, 2.0, 3.0}.
```
shouldn't that be:
```go
floats := slices.Map(s, func(i int) float64 { return float64(i) }) // Now floats is []float64{1.0, 2.0, 3.0}.
```

Ian Lance Taylor

unread,
Jun 19, 2020, 8:17:38 PM6/19/20
to Mark, golang-nuts
Thanks, sent https://golang.org/cl/239157 to fix this.

Ian
Reply all
Reply to author
Forward
0 new messages