Nailing methods, procs and blocks once and for all

Discussion in 'Ruby' started by Eli Bendersky, Apr 16, 2006.

  1. 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
     
    Eli Bendersky, Apr 16, 2006
    #1
    1. Advertising

  2. 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?ClosuresAndBlocks

    There might be more on that Wiki.

    Happy Easter

    robert
     
    Robert Klemme, Apr 16, 2006
    #2
    1. Advertising

  3. 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?ClosuresAndBlocks
    >


    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.
     
    Eli Bendersky, Apr 16, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ford Prefect alias Armin

    Can't make two request at once, one blocks all.....

    Ford Prefect alias Armin, Dec 3, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    342
    Ford Prefect alias Armin
    Dec 3, 2003
  2. matt
    Replies:
    1
    Views:
    296
    George Ogata
    Aug 6, 2004
  3. Mehr, Assaph (Assaph)

    Object#send and blocks/procs

    Mehr, Assaph (Assaph), Sep 27, 2004, in forum: Ruby
    Replies:
    2
    Views:
    141
    George Ogata
    Sep 27, 2004
  4. Eli Bendersky
    Replies:
    0
    Views:
    132
    Eli Bendersky
    Apr 18, 2006
  5. Steven Taylor
    Replies:
    9
    Views:
    279
    Brian Candler
    Apr 27, 2009
Loading...

Share This Page