How to define trees with more than one type in ML programing language
- by user550413
Well, I am asked to do the next thing:
To define a binary tree which can contain 2 different types: ('a,'b) abtree and these are the requirements:
Any inner vertex (not a leaf) must be of the type 'a or 'b and the leafs have no value.
For every path in the tree all 'a values must appear before the 'b value: examples of paths:
…