Skip to content

Commit 555f552

Browse files
committed
Merge remote-tracking branch 'origin/s/unityper-updates' into s/unityper-updates
2 parents b4d0d3e + bf1560f commit 555f552

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/polyform.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ istree(x::PolyForm) = true
176176
function similarterm(t::PolyForm, f, args, symtype; metadata=nothing)
177177
basic_similarterm(t, f, args, symtype; metadata=metadata)
178178
end
179+
function similarterm(::PolyForm, f::Union{typeof(*), typeof(+), typeof(^)},
180+
args, symtype; metadata=nothing)
181+
f(args...)
182+
end
179183

180184
operation(x::PolyForm) = MP.nterms(x.p) == 1 ? (*) : (+)
181185

0 commit comments

Comments
 (0)