An implementation of the reader monad for mongodb