fork(1) download
  1. import Data.Char
  2. import Data.List
  3. import Control.Arrow
  4.  
  5. main :: IO ()
  6. main = putStrLn $ unlines $ take 11 $ iterate f "1"
  7.  
  8. f :: String -> String
  9. f = group >>> concatMap ((length &&& head) >>> (intToDigit *** (: [])) >>> uncurry (:))
  10.  
Success #stdin #stdout 0s 6264KB
stdin
Standard input is empty
stdout
1
11
21
1211
111221
312211
13112221
1113213211
31131211131221
13211311123113112211
11131221133112132113212221