Haskell Implementation of the game Nim