add Monad-version for solveRPN