Rewrite Foo example of Rhino in Scala.