|
|
|
|
|
by dolmen
999 days ago
|
|
I have a question that this post doesn't answer: is the order of type parameters significant? Is there a canonical way, an idiomatic style for the order? Example: func Clone1[S ~[]E, E any](s S) S {
return append(s[:0:0], s...)
}
vs func Clone2[E any, S ~[]E](s S) S {
return append(s[:0:0], s...)
}
|
|