PostOrder Traversal (Not Using Recersive)
Suppose I have a binary tree, created by Combinatory Logic S, K and I primitives. The S-primitive doesn't actually duplicate anything, it just increases a reference count. So my binary tree is actually a Directed Acylic Graph of a sort. See http://stratigery.com/cl/#INTERPRETER
I'll be examining these algorithms closely, but does an algorithm exist to traverse the DAG so created as if it were a binary tree? I want to be able to count the leaf nodes of the tree, without the traversal getting hung up in the situation where an interior node's children are both the same node instance, with a reference count of 2.