How to create a record type of more than one polymorphic variable
type 'a item = { name:string; quantity:'a };;
This is the definition of polymorphic type described in the Ocaml class. I'm trying to extend this type to have more than one polymorphic variable in the element type, for example:
type 'a item = { name:string; quantity:'a; price:'b };;
But I am getting an error with unbound b value. So what should be the type of record type for more than one polymorphic variable?
+3
source to share