Skip to content

Commit af19f1c

Browse files
committed
explicit keyword not INIT
1 parent 2522f67 commit af19f1c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/functor.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ function _default_walk(f, x)
4343
re(map(f, func))
4444
end
4545

46-
const INIT = Base._InitialValue() # sentinel value for keyword not supplied
46+
@gensym nokeyword
4747

48-
function fmap(f, x; exclude = isleaf, walk = _default_walk, cache = IdDict(), prune = INIT)
49-
haskey(cache, x) && return prune === INIT ? cache[x] : prune
48+
function fmap(f, x; exclude = isleaf, walk = _default_walk, cache = IdDict(), prune = nokeyword)
49+
haskey(cache, x) && return prune === nokeyword ? cache[x] : prune
5050
cache[x] = exclude(x) ? f(x) : walk(x -> fmap(f, x; exclude, walk, cache, prune), x)
5151
end
5252

0 commit comments

Comments
 (0)