You are viewing a single comment's thread. Return to all comments →
I concocted this:
mapM_ putStrLn (map (\x -> unwords (map show x)) result)
where result is [, [1, 1], [1, 2, 1] ...] I'm sure I could get rid of the parenthesis. Any suggestions welcome.
Nice. Vscode extension 'Haskutil' recommended shorten slightly to this
n <- readLn
mapM_ (putStrLn . unwords . map show) $ tri n