import Data.List step = concatMap (\s -> (show $ length s) ++ [head s]) . group main = do mapM_ putStrLn $ take 10 $ iterate step "1"
Standard input is empty
1 11 21 1211 111221 312211 13112221 1113213211 31131211131221 13211311123113112211
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!