Code Snippets using Scala