Learn
Blocks, Procs, and Lambdas

Lambda Syntax

Lambdas are defined using the following syntax:

lambda { |param| block }

Lambdas are useful in the same situations in which you'd use a proc. We'll cover the differences between lambdas and procs in the next exercise; in the meantime, let's get a little practice in with the lambda syntax.

Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.