From: "David A. Black" Date: 2008-09-13T08:37:52+09:00 Subject: Re: Advanced conditionals Hi -- On Sat, 13 Sep 2008, Bill Kelly wrote: > > From: "David A. Black" >> >> [...] but you cannot, any longer, do this: >> >> irb(main):007:0> a = [1,2,3,4] >> => [1, 2, 3, 4] >> irb(main):008:0> e = a.enum_for(:map, &lambda {|x| x * 10 }) >> => # >> irb(main):009:0> e.next >> => 10 >> >> You'll get 1 now, rather than 10. I'm still very puzzled by the >> removal of this capability. > > Maybe worth asking on ruby-core? Still 13 days till the > feature freeze...! I did. Shugo did discuss it some, but I'm afraid I still didn't understand, or maybe I just wasn't convinced. I think it probably boils down to efficiency, though it seems to me to be an example of something so powerful and potentially useful that efficiency wouldn't (up to a point) be a deal-breaker. David -- Rails training from David A. Black and Ruby Power and Light: Intro to Ruby on Rails January 12-15 Fort Lauderdale, FL Advancing with Rails January 19-22 Fort Lauderdale, FL * * Co-taught with Patrick Ewing! See http://www.rubypal.com for details and updates!