Scala code samples