Closed
Description
I need to get the subtype of of generic parameter inside a function. I see that there is a genericHead in typetraits that get the "container". I would love to have a way to get the subtype.
seq[int].genericHead will be just seq
Use case, use TT.genericTail instead of "int" in the following proc
proc Foo[TT](a: TT): array[2, TT] =
result[0] = newSeq[int](10)
Note this can also be solved with generic generics https://github.com/nim-lang/Nim/issues/3856