func inspect(n ast.Node) func(func(ast.Node) bool) { return func(f func(ast.Node) bool) { ast.Inspect(n, f) } }
for n := range inspect(f) { fmt.Printf("%T\n", n) }
So how about a more general case ? A case where we do not have a `func Inspect` already in the stdlib ?
Maybe just replace it with (for example) `filepath.WalkDir` ?
So how about a more general case ? A case where we do not have a `func Inspect` already in the stdlib ?
Maybe just replace it with (for example) `filepath.WalkDir` ?