Created
May 28, 2012 16:52
-
-
Save jbowles/2820073 to your computer and use it in GitHub Desktop.
basic ruby lambda call
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
def func_one | |
func_one = lambda do | |
puts "lambda_one" | |
end | |
#func_one.call | |
end | |
def func_two | |
func_two = lambda do | |
puts "lambda_two" | |
end | |
#func_two.call | |
end | |
def lambda_good(func1,func2) | |
func1.call | |
func2.call | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yay Ruby!!