fork(1) download
  1. f300 :: [Int]
  2. f300 = [0,1] ++ f 1
  3. where
  4. f n = replicate (f300 !! n) n ++ f (n+1)
  5.  
  6. main :: IO ()
  7. main = print $ map (f300 !!) [10,100,1000,12345678]
  8.  
Success #stdin #stdout 3.5s 9288KB
stdin
Standard input is empty
stdout
[5,21,86,29017]