Vidyalelo
Ruby Programming · Q8

Blocks and Procs in Ruby

Programming · Ruby Programming · question 8

Q8

How do you define a lambda in Ruby?

A.
By using the create_lambda function
B.
By defining a method with the keyword lambda
C.
Using the lambda keyword followed by curly braces {}
D.
By using the -> (stabby lambda) syntax
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board