Topic/from icfp

Not to merge yet. This is the code from the ICFP contest, which I managed to transplant into this repo with significant Git hackery (git bundle, git replace, git filter-branch twice...).
Code needs to be updated for this, if this is kept.