Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Brian Chen <[email protected]>
  • Loading branch information
darsnack and ToucheSir authored Nov 3, 2022
1 parent 31cb97a commit fec8950
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/maps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ function fmap(f, x, ys...; exclude = isleaf,
walk = DefaultWalk(),
cache = IdDict(),
prune = NoKeyword())
_walk = if isnothing(cache)
ExcludeWalk(AnonymousWalk(walk), f, exclude)
else
CachedWalk(ExcludeWalk(AnonymousWalk(walk), f, exclude), prune, cache)
_walk = ExcludeWalk(AnonymousWalk(walk), f, exclude)
if isnothing(cache)
_walk = CachedWalk(_walk, prune, cache)
end
fmap(_walk, f, x, ys...)
end
Expand Down

0 comments on commit fec8950

Please sign in to comment.