Currently the postorder signature used throughout the code base is : d -> [d'] -> d'
It would be better to represent the binary context that gets consumed like so:
data PostOrderBinaryContext d d'
= LeafContext d
| InternalContext d d' d'
Also the preorder signature used throughout the code base is : [d'] -> d -> d'
It would be better to represent the binary context that gets consumed like so:
data PreOrderBinaryContext d d'
= RootContext d
| InternalContext d' (Either d d) -- So we know if the current node is the left or right child of the parent
Currently the postorder signature used throughout the code base is :
d -> [d'] -> d'
It would be better to represent the binary context that gets consumed like so:Also the preorder signature used throughout the code base is :
[d'] -> d -> d'
It would be better to represent the binary context that gets consumed like so:These functions are defined in:
The functions are used here: