I made a scanner in F #. Currently, it returns a list of tuple sets with type (token, string).
Ideally, I would like to return a list of tuples that can contain different types. For instance:
(Token, string)
(Token, float)
(Token, int)
So, basically, I would like to return a type (Token, _), but I'm not sure how to indicate this. Now he just has errors complaining about inconsistent types. I look through my book and Wikibooks, but I'm not quite sure what this is called.
If this is really not possible, I think I can convert the types later, but I was hoping I could just return the material this way.
source
share