I want to create tree with struct. Here’s my approach:

```
mutable struct node{T}
data::T
left::node
right::node
node(T)= (data=T; left= Nothing; right= Nothing)
end
root=node(1)
root.left=node(2)
root.right=node(3)
root.right.left=node(4)
root.right.right=node(5)
```

, but it doesn’t work. Later I want also create function to compute the “height” of a tree, that means the number of nodes along the longest path from the root node down to the farthest leaf node.

That would be something like that:

```
function height(root)
if root === Nothing
return 0
else
lheight = height(root.left)
rheight = height(root.right)
if lheight > rheight
return lheight+1
else
return rheight+1
end
end
end
end
```

and all the level and order printing functions.