Skip to content

Instantly share code, notes, and snippets.

@weskerfoot
Created November 17, 2020 16:13
Show Gist options
  • Save weskerfoot/08a9c4e5fefcaeea0c2d5718452d0c3d to your computer and use it in GitHub Desktop.
Save weskerfoot/08a9c4e5fefcaeea0c2d5718452d0c3d to your computer and use it in GitHub Desktop.
def f(): yield f()
def evaluate(g):
g = g()
while g:
g = next(g)
print(g)
evaluate(f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment