Ben Godfrey

FIBSEQ — Haskell

--  Display n numbers from the Fibonacci sequence.
--  
--  Afternoon <noon at aftnn.org>, 2006

import System

fibseq = 1 : 1 : [ a + b | (a, b) <- zip fibseq (tail fibseq) ]

commaJoin x y = x ++ ", " ++ y

main = do argv <- getArgs
          let n = read (head argv) in
              putStrLn (foldl1 commaJoin (map show (take n fibseq)))