The code below will report Syntax error message:
type 'a edge =
|Empty
|End of 'a * 'a vertex * 'a vertex and
type 'a vertex =
|Empty
|Vertex of 'a * 'a edge list;;
How to define two types referring to each other?
The code below will report Syntax error message:
type 'a edge =
|Empty
|End of 'a * 'a vertex * 'a vertex and
type 'a vertex =
|Empty
|Vertex of 'a * 'a edge list;;
How to define two types referring to each other?
The second type
is not syntactically correct:
type 'a edge =
|Empty
|End of 'a * 'a vertex * 'a vertex
and 'a vertex =
|Empty
|Vertex of 'a * 'a edge list;;