This is an unpolished pile of code that I am writing as I read Chris Okasaki's Purely Functional Data Structures.