Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Feb 1, 2020
1 parent b3698af commit 1c5827d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function gensym_ids(ex)
syms = Dict{Symbol, Symbol}()
prewalk(ex) do x
isgensym(x) ?
Base.@get!(syms, x, Symbol(gensymname(x), "_", counter+=1)) :
get!(()->Symbol(gensymname(x), "_", counter+=1), syms, x) :
x
end
end
Expand All @@ -194,7 +194,7 @@ function alias_gensyms(ex)
left = copy(animals)
syms = Dict{Symbol, Symbol}()
prewalk(ex) do x
isgensym(x) ? Base.@get!(syms, x, pop!(left)) : x
isgensym(x) ? get!(()->pop!(left), syms, x) : x
end
end

Expand Down

0 comments on commit 1c5827d

Please sign in to comment.