Haskell implementation of binary tree.