scala snippets for reddit posts