Some correction and refactoring
Some correction and refactoring

    * Require `IsMonomialOrder` instead of `IsOrder` to ensure termination
    * defined `mapMaybeM`

konn/computational-algebra,konn/computational-algebra