Is it possible to build a Python style recursive generator with Elixir? Something like this:

```
def traverse(parent_dir):
    dirs, files = get_dirs_and_files_as_lists(parent_dir)

    for d in dirs:
        yield from traverse(d)

    for f in files:
        yield f

```

For all the files to be processed linearly, without overhead implied by an eager list of indefinite length:

```
for f in traverse(dir):
    process(f)

```

This, or some working equivalent, should be possible using streams; unfortunately, I have no idea how.

I want something like this, just lazy:

```
def traverse_eagerly(parent_dir) do
  {dirs, files} = get_dirs_and_files_as_lists(parent_dir)

  for x <- dirs do
    traverse_eagerly(x)
  end
  |> Enum.concat()
  |> Enum.concat(files)
end

```