Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created August 25, 2016 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/ea39c33869d1cceeaa7056f06f27cca7 to your computer and use it in GitHub Desktop.
Save anonymous/ea39c33869d1cceeaa7056f06f27cca7 to your computer and use it in GitHub Desktop.
def lambda_with_recursive_callback(&block)
lambda { |x| x.call(x) }.call(
lambda do |myself|
lambda do |arg|
block.call(arg, myself.call(myself))
end
end
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment