Skip to content

Commit

Permalink
code simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
marius311 committed Nov 14, 2024
1 parent 09b9426 commit 31ea454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Memoization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function _memoize_funcdef(cache_constructor, cache_constructor_expr, funcdef)
# give unnamed args or all-underscore args a placeholder name
sdef[:args] = map(sdef[:args]) do arg
sarg = splitarg(arg)
if sarg[1] == nothing || all(split(string(sarg[1]),"") .== "_")
if sarg[1] == nothing || all(==('_'), string(sarg[1]))
arg_name = gensym()
else
arg_name = sarg[1]
Expand Down

0 comments on commit 31ea454

Please sign in to comment.