I am trying to construct something like this
type ('a, 'b) btree = Empty | Node of ('a, 'b) * ('a, 'b) btree * ('a, 'b) btree
but it says syntax error around where the first asterisk is.
The type of a pair looks like 'a * 'b
so you want this:
type ('a, 'b) btree =
Empty |
Node of 'a * 'b * ('a, 'b) btree * ('a, 'b) btree
Or possibly this:
type ('a, 'b) btree =
Empty |
Node of ('a * 'b) * ('a, 'b) btree * ('a, 'b) btree