-
-
Save anonymous/ea39c33869d1cceeaa7056f06f27cca7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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