top | item 38768760

(no title)

thelibrarian | 2 years ago

No, blocks are lambdas.

discuss

order

dragonwriter|2 years ago

No, in Ruby lambdas are lambdas (and are a special type of proc); the longhand way to create a lambda is to call Kernel#lambda and pass it a block (though modern Ruby has a special shorthand syntax for lambdas, as well.)

Blocks are sort of like anonymous function literals that are not first class, one (but no more than one) of which may be attached to a function call.