Tree-walk put in a Nutshell

I n the current semester I work for Software Language Engineering on a very nice project: traversing trees in a not so common manner. The approach is called “tree walking” and behaves like a nuthatch (sitta europaea) to go through a tree.

I created a simple and self-contained implementation of this scheme in Haskell. In my repo here you’ll find all material including the presentations and the source code.

What I really like about this project is the simplicity: the outcome is a presentation and a source file with the entire project contained (“nuthatch.hs”). Functional programming languages make it very easy to write concise code by performing complex operations. Therefore the source file contains much more comments than code lines. But I like this expressiveness and also the nice features like list operations and pattern matching. When processing lists foldr and map are really handy.

And I like my documentation ;-) of the project. Documentation is a really important thing in order to provide an entry into the structure of the project to new people or even to yourself if you forgot about it. Please trust me if I say: documentation is as important as the source code itself.