Various Scala snippets of interest - some of them plagiarised