- Published
- Author
- Ayush SrivastavaSystem Analyst
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:
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:
Ruby
say_something = -> { puts "This is a lambda" }