3 ms·
I'd call that function: polymorphic over tuple length.
by youerbt 3y ago
I'd call that function: polymorphic over tuple length.
- Timon3 3y agoThat kind of works. I guess I keep thinking about it from the perspective of the type itself instead of the function that uses it.
- youerbt 3y agoIt can also get confusing, because in some languages there is no general notion of being a tuple or n-tuple if you wish. Even if they are casually all called tuples. For example in Haskell 2-tuple and 3-tuple are simply distinct types, as distinct as Int is from String. You can't speak to the type system about "all n-tuples".