for example if I want literal type for Nullable(x) like a
let x = 6x // nullable literal type
So is it real to make own literal types ?
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.
yes, you can
F# spec:
Integer literals with the suffixes Q, R, Z, I, N, G are used for user-defined and library-defined types through the following syntactic translation:
xxxx<suffix>
For example, defining a module NumericLiteralZ as below permits the use of the literal form 32Z to generate a sequence of 32 ‘Z’ characters. No literal syntax is available for numbers outside the range of 32-bit integers.