New Discussion

Notifications

You’re not receiving notifications from this thread.

Loops & Blocks in Ruby Discussion

5
General

Hey Collin! Can you give us some examples where you might want to reach for a Proc or a stabby lambda instead of a regular method / function?

Sure thing, I'll work on writing something up soon and/or add a video about this. One thing to think about in the meantime is this: A method (typically) is "bound" to a specific object, causing self to refer to that object when the method is invoked. On the other hand, a Proc lacks this behavior, as self relies on the context in which the Proc was created or called.

Interesting! And awesome, looking forward to it. :)

One of my favs in the series so far! : )

Is it really "introduction" to loops? I'm talking about the second part

Thanks you, Collin! Just one comment: there are some simple things that you explain with all details, but there are others that are complicated and I feel that I have not enough information on them. Especially Proc, yield and lambda.
For everyone else I would recommend using GPT to learn more about those thing in addition to great Collin's tutorial

Join the discussion
Create an account Log in

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.