diff --git a/src/default_term.jl b/src/default_term.jl index 7a91d5ad..0a8b3203 100644 --- a/src/default_term.jl +++ b/src/default_term.jl @@ -38,6 +38,11 @@ function convert_constant(::Type{Term{C,M} where C}, α) where {M} return convert(Term{typeof(α),M}, α) end +function map_coefficients!(f::F, t::Term; nonzero = false) where {F<:Function} + t.coefficient = f(t.coefficient) + return t +end + function Base.promote_rule( ::Type{Term{C,M1} where {C}}, M2::Type{<:AbstractMonomialLike},