Skip to content

Commit b00af4d

Browse files
author
a
committed
adjust
1 parent 155d705 commit b00af4d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/utils.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
is_operation(f)
33
44
Returns a single argument anonymous function predicate, that returns `true` if and only if
5-
the argument to the predicate satisfies `istree` and `operation(x) == f`
5+
the argument to the predicate satisfies `iscall` and `operation(x) == f`
66
"""
7-
is_operation(f) = @nospecialize(x) -> istree(x) && (operation(x) == f)
7+
is_operation(f) = @nospecialize(x) -> iscall(x) && (operation(x) == f)
88
export is_operation
99

1010

1111
"""
1212
node_count(t)
13-
Count the nodes in a symbolic expression tree satisfying `istree` and `arguments`.
13+
Count the nodes in a symbolic expression tree satisfying `isexpr` and `arguments`.
1414
"""
15-
node_count(t) = istree(t) ? reduce(+, node_count(x) for x in arguments(t), init = 0) + 1 : 1
15+
node_count(t) = isexpr(t) ? reduce(+, node_count(x) for x in children(t); init=0) + 1 : 1
1616
export node_count

0 commit comments

Comments
 (0)