using Lazy children(m::Module) = @>> names(m, true) map(x->m.(x)) filter(x->isa(x, Module) && x ≠ m)
children(Main) then provide you with a list of loadable modules.
Edit: I used Lazy.jl here for the thrush macro ( @>> ), but you can rewrite it without much difficulty:
children(m::Module) = filter(x->isa(x, Module) && x ≠ m, map(x->m.(x), names(m, true)))
Alternatively, you can add && x ≠ Lazy to the filter to avoid including it.
one-more-minute
source share