Comparison of Scala and Ruby examples