Example Scala code