Skip to content

Instantly share code, notes, and snippets.

@Sihui
Last active June 4, 2018 21:11
Show Gist options
  • Save Sihui/0b47a96a845c07c92c7652f503ff67d8 to your computer and use it in GitHub Desktop.
Save Sihui/0b47a96a845c07c92c7652f503ff67d8 to your computer and use it in GitHub Desktop.
For [Code Block, Proc, Lambda, and Closure in Ruby]() Raw
Proc.new { puts 'I am a proc' }
proc { puts 'I am a proc' }
lambda { puts 'I am a lambda' }
-> { puts 'I am a lambda' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment