I am trying to come up with a datatype for a general tree. I tried writing
datatype 'a TREE = null | Node of 'a * 'a TREE list;
but it didn't work out. My idea is to create a list of child nodes for a parent node and then each of the nodes in this list will be the parent node for another lists of nodes and so on. How can this be achieved?