The different ways to specify a generic type
According to the section here on generic types: http://msdn.microsoft.com/en-us/library/dd233230.aspx then these forms are equivalent:
type 'a MyType = ....
type MyType<'a> = ...
but the 2nd form allows you to specify a list of type parameters, eg:
type MyType开发者_StackOverflow社区<'a,'b> = ...
Is this right?
That's right. There is a way to supply multiple parameters in the first style too:
('a,'b) MyType
but this is for compatibility and is not recommended.
精彩评论