On Fri, Jan 21, 2022 at 7:30 AM Manlio Perillo <manlio.peri...@gmail.com> wrote:
>
> There is a typo in the List[T].Range method, in  
> golang.org/design/43651-type-parameters#list-transform.
> The return type is *Iterator[T] but Iterator[T] is returned, instead.

Thanks again, fixed.

> Another issue is the implementation of AbsoluteDifference, in 
> golang.org/design/43651-type-parameters#absolute-difference.
> The code is invalid due to #45639, but I suspect that the suggestion to use a 
> struct
>
>   type ComplexAbs[T OrderedNumeric] struct {  X T  }
>
> will not solve the problem.
> Moreover the code suggested in the issue:
>
>     func (a ComplexAbs[T]) Abs() ComplexAbs[T] {        d := 
> math.Hypot(float64(real(a.X)), float64(imag(a.X)))     return 
> ComplexAbs[T](complex(d, 0)) }
>
> does not compile.

Thanks, I'm going to leave this as is for now.  45639 is still open.

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/CAOyqgcU%3DQciAXgySUbGAAFE1Uv2qs7RySPgdAN%2B8A8YbzUPpug%40mail.gmail.com.

Reply via email to