Nailing methods, procs and blocks once and for all

E

Eli Bendersky

Hi All,

Is there a tutorial somewhere that clear away all questions that newbie
Rubyists have about methods, procs and blocks ? Most importantly:

- When is each typically used
- How are they converted to-and-from one another
- How they are used to express common functional programming idioms:
functions as first-class constructs, anonymous functions, passing
functions around, closures, and so on.

I think a single resource explaining this topic would clear much of the
questions that arise on comp.lang.ruby almost every week.

Kind regards,
Eli
 
R

Robert Klemme

Eli said:
Hi All,

Is there a tutorial somewhere that clear away all questions that newbie
Rubyists have about methods, procs and blocks ? Most importantly:

- When is each typically used
- How are they converted to-and-from one another
- How they are used to express common functional programming idioms:
functions as first-class constructs, anonymous functions, passing
functions around, closures, and so on.

I think a single resource explaining this topic would clear much of the
questions that arise on comp.lang.ruby almost every week.

Does this help?

http://www.rubygarden.org/ruby?ClosuresAndBlocks

There might be more on that Wiki.

Happy Easter

robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top