Skip to content

Instantly share code, notes, and snippets.

Created August 25, 2016 12:57
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/aad295537f27ad6921c605a842b116fd to your computer and use it in GitHub Desktop.
Save anonymous/aad295537f27ad6921c605a842b116fd to your computer and use it in GitHub Desktop.
def foo
lambda do |x|
yield(x)
end
end
bar = foo {}
# How to get a proc into bar?
def foo(l)
lambda do |x|
l.call(x)
end
end
bar = foo lambda{}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment