Haskell Algorithms, always awesome