[<<][haskell][>>][..]
Sun Jun 3 13:13:16 EDT 2018

Bottom scraper as illustration of operating on tree coordinates

The main idea is that it is possible to describe a tree as a map form
coordinates to values.  This exposes operations on the coordinates
that hare otherwise hard to express on the tree.

It is a special case of the general principle of transforming to an
isomorphic representation to make certain operations trivial.

A useful trick, but coordinate code can be hard to read.

Also: it is not a good idea if the tree structure contains symbolic
names to be used as indexing tags.  E.g. in EDIF.hs this was used
assuming low-level structure could be dependend upon.  Code is now
changed to use symbolic referencing.



The idea is though that when s-expression structure is rigid, it is
possible to use coordinates and local context:

1) Convert tree to path->val map, with "zipper" paths
2) Find nodes by filtering on the deep end of the path, returning path
3) Fetch other information by transforming those paths.


This allows ignoring most of the top level boiler plate.




[Reply][About]
[<<][haskell][>>][..]