Hi > > > mapM_ putStrLn (hanoi 2) -- outputs each move > > in a new line > > > putStrLn (unlines (hanoi 2)) -- same as > > previous line
putStr (unlines (hanoi 2)) is what you want. Unlines puts a trailing new line at the end of every line, including the final one. putStrLn puts an additional trailing new line, so you get 2 at the end. mapM_ putStrLn == putStr . unlines Thanks Neil _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe