Document monads