Tag Archives: fibonacci

(PHP) Fibonacci series (several different algorithms)

Planning to add proper PHPunit and PHPlogger code examples and blog about it at http://bcmoney-mobiletv.com/blog/

Posted in PHP | Also tagged , , , , , , | Leave a comment

(Java) Fun with Fibonacci, Golden Ratio and Factorials, with loops vs recursives

 

Posted in Java | Also tagged , , , , , , , | Leave a comment

(Haskell) Fibonacci List Oneliner

I didn’t invent this, but it’s too cool a snippet not to capture. Here’s a one-liner that will generate a list of Fibonacci numbers in linear time. EXPLANATION: the colon operator is used to add elements to a list, so it starts out adding on the two base cases, zero and one. After you have [...]

Posted in Haskell | Also tagged , , , , | Leave a comment

Fibonacci sequence in Haskell

The fibonacci sequence has many applications , such asĀ paintings , predicting stock market changes and even sunflowers. This example illustrates the fibonacci sequence in Haskell.

Posted in Haskell | Also tagged , , , , , , | Leave a comment