Ruby. They are not objects. ➤ But it is possible to create an object that represent a block. Depending on how we do that they are called a proc or a lambda ➤ Both procs and lambdas are instance of the same class called Proc ➤ Procs have block-like behavior and lambdas have method like behavior
object form of a block ➤ A lambda is an object form of a method ➤ Calling a proc is like yielding to a block ➤ Calling a lambda is like invoking a method. ➤ This effects return statement and argument passing
convert :first_name to a Proc object ➤ & is used to cast the Proc object to the block it represents. ➤ And that’s how users.map(&:first_name) becomes a widely used shorthand users.map { |u| u.first_name }