Re: [go-nuts] [generics] tiny typo in Map/Reduce/Filter examples

2020-06-19 Thread Ian Lance Taylor
On Wed, Jun 17, 2020 at 9:35 AM Mark  wrote:
>
> 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}.
> ```

Thanks, sent https://golang.org/cl/239157 to fix this.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcW-Tq%2B4XqKotJH59K6enzjaAe-VmaaYWegEju%2B3kZN0bg%40mail.gmail.com.


[go-nuts] [generics] tiny typo in Map/Reduce/Filter examples

2020-06-17 Thread Mark
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}.
```

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/50d7ea44-9aa2-4688-84fd-22fb2c08f09ao%40googlegroups.com.