Hi,
Say i want to implement a “map” function on generic slices with go1.18beta1… The method’s prototype should be something like:
func (xs List[T]) Map(fct func(x T) S) List[S] {...}
assuming List[T]
is defined as:
type List[T any] []T
Unfortunately, i’ve no found how to introduce the S
generic in the method declaration. Is it even possible?