Skip to content

Instantly share code, notes, and snippets.

@edmt
Created November 24, 2019 20:54
Show Gist options
  • Select an option

  • Save edmt/c4e6335f01687e6913a2159d9b7a2297 to your computer and use it in GitHub Desktop.

Select an option

Save edmt/c4e6335f01687e6913a2159d9b7a2297 to your computer and use it in GitHub Desktop.
Looping with Untyped λ-calculus in Ruby (inspired on Paged Out zine #2, page 23 article)
->(f, n) { puts(n) + f.(f, n + 1) }.(->(f, n) { puts(n) + f.(f, n + 1) }, 1)
->(f) { f.(f, 1) }.(->(f, n) { puts(n) + f.(f, n + 1) })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment