Created
February 6, 2014 06:05
-
-
Save joseph-montanez/8839043 to your computer and use it in GitHub Desktop.
Get the type of a some generic?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main.fs: error FS0001: This expression was expected to have type | |
'a | |
but here has type | |
'b option |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let foo<'a> (o: 'a) = | |
match o with | |
| Some(n) -> typeof<n> | |
| None -> "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment