Return all tree values in depth-first post-order. Parents appear after their children. For example:
// ┬1 // ├┬2 // │└┬3 // │ └─4 // └─5 const myTree = branch( 1, [ branch(2, [ branch(3, [ leaf(4), ]), ]), leaf(5), ] ) const myValues = postOrderValues(myTree) // [4, 3, 2, 5, 1] Copy
// ┬1 // ├┬2 // │└┬3 // │ └─4 // └─5 const myTree = branch( 1, [ branch(2, [ branch(3, [ leaf(4), ]), ]), leaf(5), ] ) const myValues = postOrderValues(myTree) // [4, 3, 2, 5, 1]
Return all tree values in depth-first post-order. Parents appear after their children. For example: