Refactor to separate node from tree structure.
Refactor to separate node from tree structure.

This makes the two different types of equality -- same node vs same
subtree -- more natural to express, and allows functions that return
other functions, e.g. f(x)(y).

martincmartin/MathematiciansAssistant