fork(1) download
  1. import Data.List
  2.  
  3. step = concatMap (\s -> (show $ length s) ++ [head s]) . group
  4.  
  5. main = do
  6. mapM_ putStrLn $ take 10 $ iterate step "1"
Success #stdin #stdout 0s 6264KB
stdin
Standard input is empty
stdout
1
11
21
1211
111221
312211
13112221
1113213211
31131211131221
13211311123113112211