Help for this page

Select Code to Download


  1. or download this
    fib :: [Integer]
    fib = 1 : 1 : zipWith (+) fib (tail fib)
    
  2. or download this
    inschar n c = foldr1 (\s1 s2 -> s1 ++ c : s2) . 
              map (take n) . takeWhile (not . null) . iterate (drop n)
    
    commaize :: String -> String
    commaize = reverse . inschar 3 ',' . reverse