Solve the same simple problem with different languages.

Solutions with Haskell, Scala, Clojure and Ruby.