Lambda Block vs. Method
I was just wondering what the benefit would be of creating a block
that can be called rather than defining a method. Here is an example:
def puts_time(x)
puts x
end
instead of...
puts_time = lambda { |x| puts x }
personally I see no reason to create a block like this instead of a
method.
|