Skip to content

Instantly share code, notes, and snippets.

@at-longhoang
Created March 8, 2016 03:57
Show Gist options
  • Save at-longhoang/941806555f927ac51c58 to your computer and use it in GitHub Desktop.
Save at-longhoang/941806555f927ac51c58 to your computer and use it in GitHub Desktop.
proc = Proc.new { |x| x + 1 }
puts proc.call(2)
result = lambda { |x| x + 1 }
puts result.call(2)
proc = Proc.new { |x| x + 1 }
puts proc.call(2,3)
result = lambda { |x| x + 1 }
puts result.call(2,3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment