Closed
Description
See beacon-biosignals/LegolasFlux.jl#4 (comment) and the alternate implementation
function fcollect2(x; output = [], cache = Base.IdSet(), exclude = v -> false)
x in cache && return output
if !exclude(x)
push!(cache, x)
push!(output, x)
foreach(y -> fcollect2(y; cache = cache, output=output, exclude = exclude), Functors.children(x))
end
return output
end
Metadata
Metadata
Assignees
Labels
No labels