Experimenting with Generics

I played with the new Go Generics and tried to implement something I previously had in Haskell, C++ and Swift:


Swift has a nice feature to extend primitive types to adhere to new interfaces. How to implement this in go is much less obvious to me. Are Go generics powerful enough compared to above mentioned languages?

I think the first step may be changing from:

type Split[T AssociativeAlgebra] struct {


type Split[U any, T AssociativeAlgebra[U]] struct {

Seems very unintuitive to specify 2 type parameters (U, T), while the struct only uses a single one T.