For further actions, you may consider blocking this person and/or reporting abuse
Read next
Handing Your Database Over to Users
e4c5Nf3d6 -
Did you get functional-reactive wrong?
Dario Mannu -
Reducing the Boilerplate for Services Utilizing Subjects in Angular
Volodymyr Yepishev -
3.5. Unconditional Love: Love that knows no conditions or boundaries, often seen in the love between parents and children.
Rohan Kumar Bhoi -
Top comments (1)
A lambda is a kind of proc.
That doesn't really matter, but it's worth noting.
Both are one-off bits of code you can pass around a little bit more easily than, say, a method or block.
And between the two, a Proc acts more like a "block" (e.g.
.each do
) and lambda acts more like a "method" (e.g.def new_method
).And those differences are:
Lambdas and methods check the number of arguments (meaning you could get the
ArgumentError: wrong number of arguments (3 for 1)
error and they also return from themselves, and not the enclosing method. Blocks and procs return from the greater scoped method.By returning from itself vs
Meaning:
I think that's basically accurate. The good news is you can definitely get far without having this stuff down for sure.
If I got this wrong I'd love some additional feedback.