Writing Monads in Scala with Spark-Notebook (www.reddit.com)