I think it's more common to use this in Elixir:
```
sub_dirs =
  sub_dirs
  |> Enum.map(Path.wildcard(&1))
  |> List.concat
  |> Enum.filter(File.dir?(&1)) 
```
@josevalim ?