[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Nailing methods, procs and blocks once and for all

Eli Bendersky

4/16/2006 8:05:00 AM

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

2 Answers

Robert Klemme

4/16/2006 10:16:00 AM

0

Eli Bendersky wrote:
> 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?Closure...

There might be more on that Wiki.

Happy Easter

robert

Eli Bendersky

4/16/2006 11:58:00 AM

0


Robert Klemme wrote:
> Eli Bendersky wrote:
> > 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?Closure...
>

Thanks, I will look into this.
In any case, driven by sheer curiosity I set out to write an article on
this topic. I will post a link once it's finished.