Why:
func Sum(type T numeric)(x []T) T {
and not just
func Sum(x []T type numeric) T {
or
func Sum(x []T Numeric) T {
Jon
On Tuesday, September 4, 2018 at 11:57:02 AM UTC-7, Matt Sherman wrote:
>
> Here’s a riff on generics focused on builtin typeclasses (instead of user
> contracts): https://clipperhouse.com/go-generics-typeclasses/
>
> Feedback welcome.
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.