Nice post. Functional programming is an excellent paradigm for manipulating these data structures.<p>I wrote a limited visualizer for this a few years back.<p><a href="http://bl.ocks.org/bcrisp/6072748" rel="nofollow">http://bl.ocks.org/bcrisp/6072748</a>