Working with Datatypes
(* Create a binary tree, test whether an element occurs in the tree, and insert an element *)
val mytree = I(50,I(25,L(10),L(40)),I(75,L(60),L(90)));
fun member (i, NULL) = false |
member (i, L(j)) = (i = j) |
member (i, I(j, ls, rs)) =
else if i < j then member (i, ls)