Functional OO idiom

A common first program in imperative/procedural languages is "Hello World". A common first program in functional programming languages is Fibonacci.

In some imaginary functional programming language, Fibonacci might look something like this:

data Nat = zero | successor Nat
plus zero y = y
plus (successor x) y = successor (plus x y)
fibonacci zero = (successor zero)
fibonacci (successor zero) = (successor zero)
fibonacci (successor (successor x)) = (plus (fibonacci x) (fibonacci (successor x))

And that's fine. It's entirely possible to transliterate this functional program directly into a normally imperative, object-oriented language. I found it an entertaining exercise.