I understand the tick to signify a generic parameter, as in:
Seq.append : seq<'T> -> seq<'T> -> seq<'T>
but what does the caret signify, as in:
Seq.average : seq<^T> -> ^T
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The detailed signature is:
Unlike
Seq.append, Seq.average needs some more constraints on type of elements. Particularly:As you can see, both
(+),DivideByIntandZeroare required in order thatSeq.average<^T>makes sense.Useful information about generics could be found hereMSDN.