Skip to content

Commit 93cb08d

Browse files
use more optimized map/any
1 parent deacb09 commit 93cb08d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ function has_trig_exp(term)
1515
if Base.@nany 9 i->fns[i] === op
1616
return true
1717
else
18-
return any(has_trig_exp, arguments(term))
18+
return any(has_trig_exp, parent(arguments(term)))
1919
end
2020
end
2121

2222
function fold(t)
2323
if iscall(t)
24-
tt = map(fold, arguments(t))
24+
tt = map(fold, parent(arguments(t)))
2525
if !any(x->x isa Symbolic, tt)
2626
# evaluate it
2727
return operation(t)(tt...)

0 commit comments

Comments
 (0)