4 ms·
How do your examples specify that T and U are generics?
by octocoupler 11y ago
How do your examples specify that T and U are generics?
- kittenfluff 11y agoAs I said, in Haskell "unquantified type variables are implicitly universally quantified" i.e. type variables (which are always lowercase in Haskell, to distinguish them from concrete types which are uppercase) are always generic. So it's true that in the Swift examples, you would need a convention to distinguish type variables from concrete types, or else you need to explicitly mark them as generic.