As a small project for rainy sundays I am implementing a function to calculate the fibonacci sequence in various languages. The problem in itself is not too interesting and therefore provides a perfect vessel to look at some peculiarities about programming languages.

  1. Haskell: This post introduces direct recursion and accumulated recursion in Haskell.
  2. C: C as an imperative language is introduced, and Fibonacci was implemented in an iterative style.
  3. Java: The Fibonacci function is implemented by means of dynamic programming.
  4. Scala: Scala is the language, Continuation Passing style is the concept.
  5. Prolog: Fibonacci is here implemented in logic programming. Furthermore, we use ADTs to derive the argument to the function.
  6. Spreadsheet: The key idea is to abstract the concept of programming to include more than written text.
  7. JavaScript: Introducing the concept of events in JavaScript. This is a base for the concepts of streams, signals, etc. which will be introduced later on.
  8. Coq: The introduction of theorem proving using a programming language.
  9. R: Using R to plot the relationship between $n$ and $fib(n)$.
  10. Haskell Types: Implementing the Fibonacci function using dependent programming in Haskell.
  11. Python: Focusing on the relationship between list comprehensions and set definitions in mathematics.
  12. Fixed Point: Introducing the theoretical concept of fixed points.
  13. Julia: Using fast exponentiation.