[Skip To Content]


# fibonacci in haskell

  1. main = print( fib 10 )
  2. fib :: Int -> Int
  3. fib( 0 ) = 0
  4. fib( 1 ) = 1
  5. fib( x ) = fib( x - 1 ) + fib( x - 2 )

My first Haskell program! Looks very like the definition on Wikipedia.

More about this site...

Last Week’s Top 5 Albums (More »)

  1. Conor OberstConor Oberst
  2. Cruel TownBroder Daniel
  3. Far From the Maddening CrowdsChicane
  4. The Midnight Organ FightFrightened Rabbit
  5. Perfect CureLorraine