Sample code snippet for Scala learning made easy