From: Brian Candler Date: 2003-04-05T20:46:27+09:00 Subject: Re: What are the differences between Ruby's blocks and Python's lambdas? On Fri, Mar 28, 2003 at 06:55:01AM +0900, Phil Tomson wrote: > >I had no idea that you could use the result of 'class...end' in that way... > >neat! > > > > pp = proc { |x| x+1 } > > addmeth(:pp,pp) > > pp(3) # >> 4 > > > >Wonderful. > > > >Cheers, > > I guess I'm not quite catching this.... but there does seem to be > something quite useful here. Could someone write this up on the wiki? I have just added http://www.rubygarden.org/ruby?SingletonTutorial which includes the above example at the end. Does it help? Cheers, Brian.