A simple k-d tree implementation in Haskell