File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 22 is_operation(f)
33
44Returns 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)
88export 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
1616export node_count
You can’t perform that action at this time.
0 commit comments