Towers of Hanoi implementation in Haskell