I have been looking for some time and I cannot find a solution. This is probably a simple syntax issue that I cannot understand.
I have a type:
# type ('a, 'b) mytype = 'a * 'b;;
And I want to create a type variable string string sum.
# let (x:string string mytype) = ("v", "m");;
Error: The type constructor mytype expects 2 argument(s),
but is here applied to 1 argument(s)
I tried a different way of placing brackets around type parameters, I get almost the same error.
It works, however, with single parameter types, so I guess there is some kind of syntax that I don't know.
val x : string mytype2 = ("hola", "hello")
Can someone please tell me how to do this with two parameters?
source
share