I would do one of:

```elixir
sub_dirs = sub_dirs
  |> Enum.map(Path.wildcard(&1))
  |> List.concat
  |> Enum.filter(File.dir?(&1)) 
```

Or:

```elixir
sub_dirs = sub_dirs
           |> Enum.map(Path.wildcard(&1))
           |> List.concat
           |> Enum.filter(File.dir?(&1)) 
```

But up for discussion :D