
24 Nov
2010
24 Nov
'10
5:19 p.m.
On 24 November 2010 21:12, Russ Abbott
Another example is to imagine a Tree in which the leaves contain "objects." If I want to change a property of one of those leaf objects, I am forced to rebuild all the ancestor nodes of that leaf down to rebuilding the root.
Specifically for re-writing trees, attribute grammars are probably more concise than OO or functional methods. Haskell has an attribute grammar pre-processor UUAG available. http://hackage.haskell.org/package/uuagc Zippers too may or may not be a convenience for this sort of manipulation.