author avatar

ayushsrivastava

Thu Nov 30 2023

Lambda A lambda is a way to define a block & its parameters with some special syntax. You can save this lambda into a variable for later use. The syntax for defining a Ruby lambda looks like this:

say_something = -> { puts "This is a lambda" }