Thank you. Just looked it up and noticed that the docs actually list lambdas as a proc flavour. Frankly, I'm not sure if that makes it better or worse.🤣
I also think the new ->(x, y) { x * y } syntax is cooler than the old lambda keyword.
Hehe, it's the syntax I see in most places too, but I prefer lambda, as it's clearer. Same thing for the .() (and all the different ways you can call in Ruby—I favour .call().😄 But I did not know that it worked in the reverse too (replacing a user-defined .call() method. Interesting.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank you. Just looked it up and noticed that the docs actually list lambdas as a proc flavour. Frankly, I'm not sure if that makes it better or worse.🤣
Hehe, it's the syntax I see in most places too, but I prefer
lambda
, as it's clearer. Same thing for the.()
(and all the different ways you can call in Ruby—I favour.call()
.😄 But I did not know that it worked in the reverse too (replacing a user-defined.call()
method. Interesting.