Towards a monadic solution.