Skip to content

Instantly share code, notes, and snippets.

@at-longhoang
Created March 8, 2016 03:58
Show Gist options
  • Save at-longhoang/f29cc578f0d7131b67e6 to your computer and use it in GitHub Desktop.
Save at-longhoang/f29cc578f0d7131b67e6 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)
//Error here
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