creating instance using lambda
def a_method
a=lambda { return "we just returned from the block" }.call
p a
return "we just returned from the calling method"
end
puts a_method
creating instance using proc
def a_method
a=Proc.new { return "we just returned from the block" }.call
print a
p "we just returned from the calling method"
end
puts a_method
I want to know how this two representations are different??