Skip to content

Instantly share code, notes, and snippets.

@fsword
Last active October 1, 2015 18:18
Show Gist options
  • Save fsword/2036968 to your computer and use it in GitHub Desktop.
Save fsword/2036968 to your computer and use it in GitHub Desktop.
fiber recursion
def f(i); puts('%10s' % i) if i%1000==0; Fiber.new{f(i+1)}.resume end; f(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment