I have this tree node :
type Tree<'T when 'T: comparison> =
| Empty
| Node of 'T * Tree<'T> * Tree<'T>
but I cant find out a good insert function.
I don’t want to do a interactive program, the input should be a list that is inserted to the tree.
If you don’t need the tree to be balanced then you can use:
You can insert a list of values into a tree with: