Added another naive haskell solution, with IO usage