+ 1
Ruby: explain me this lambda
x = lambda{|a =2,b|} puts x.lambda? Why is it true?
1 Réponse
+ 2
Because "lambda?" method verify if variable is a lamda function.
You declare x and assign it a lambda function, so "true" is the right response...
x = lambda{|a =2,b|} puts x.lambda? Why is it true?