A small monad experiment inspired by http://mttkay.github.io/blog/2014/01/25/your-app-as-a-function