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;;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With