Skip to content

Instantly share code, notes, and snippets.

@njpearman
Created July 14, 2010 11:20
Show Gist options
  • Save njpearman/475305 to your computer and use it in GitHub Desktop.
Save njpearman/475305 to your computer and use it in GitHub Desktop.
def create_lambda
lambda {|i| puts "You're at #{i}" }
end
my_lam = create_lambda
[1,2,3].each &my_lam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment