Search code examples
functional-programmingsml

Standard ML: Binary Tree Datatype


My notes include the following definition for a binary tree:

datatype tree = Empty | Node of tree * int * tree

How do I know whether the second option in the definition is supposed to mean:

Node of (tree * int * tree)

or

Node of tree * int * tree?

Thanks,

bclayman


Solution

  • Node of (tree * int * tree) and Node of tree * int * tree are the same