import Data.List yoba n = foldr ((\g -> g . transpose . g) . map . (:)) [[0]] [1..n] main = mapM_ (putStrLn . concat . intersperse "\t" . map show) $ yoba 9
Standard input is empty
1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 1 2 3 3 3 3 3 3 3 3 1 2 3 4 4 4 4 4 4 4 1 2 3 4 5 5 5 5 5 5 1 2 3 4 5 6 6 6 6 6 1 2 3 4 5 6 7 7 7 7 1 2 3 4 5 6 7 8 8 8 1 2 3 4 5 6 7 8 9 9 1 2 3 4 5 6 7 8 9 0
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!