Skip to content

Instantly share code, notes, and snippets.

@elijahbenizzy
Last active August 16, 2023 19:41
Show Gist options
  • Save elijahbenizzy/132f7114e003672672ac5c1d75b6d67c to your computer and use it in GitHub Desktop.
Save elijahbenizzy/132f7114e003672672ac5c1d75b6d67c to your computer and use it in GitHub Desktop.
def file_to_load() -> Parallelizable[str]:
for file_ in _list_files(...):
yield file_
def file_contents(file_to_load: str) -> str:
with open(file_to_load) as f:
return f.read()
def all_contents(file_contents: Collect[str]) -> str:
out = "".join(file_contents)
return out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment