Created
March 8, 2016 03:58
-
-
Save at-longhoang/f29cc578f0d7131b67e6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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