Skip to content

Commit bd02a51

Browse files
fixup! use more optimized map/any
1 parent 0ea0671 commit bd02a51

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/matchers.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ function matcher(val::Any)
1010
# if val is a call (like an operation) creates a term matcher or term matcher with defslot
1111
if iscall(val)
1212
# if has two arguments and one of them is a DefSlot, create a term matcher with defslot
13-
if length(arguments(val)) == 2 && any(x -> isa(x, DefSlot), arguments(val))
13+
args = parent(arguments(val))
14+
if length(args) == 2 && any(x -> isa(x, DefSlot), args)
1415
return defslot_term_matcher_constructor(val)
1516
# else return a normal term matcher
1617
else

0 commit comments

Comments
 (0)