From: "trans. (T. Onoma)" Date: 2004-09-21T02:34:35+09:00 Subject: Re: Array#index block and rdetect On Monday 20 September 2004 01:06 pm, Hal Fulton wrote: > Haha, I am now. I haven't followed the entire discussion because beyond a > certain point it was hurting my head to think about it. > > I do like the idea of knowing which is the "first" and "last" index without > manually using a flag or something. For those who may be interested, I once > wrote a little piece of code illustrating my idea of a "super-iterator." > This idea had its problems, and it was never fleshed out. But I still like > many of the motivations behind it. Hmmm... what was it about? Reference? --- On Monday 20 September 2004 12:23 pm, David A. Black wrote: > I liked Tom's idea of "counter". That seems to be more what it is. :) --- One begins to wonder if maybe blocks might have "underwritten" parameters. Not sure how it might work, but basically there would be special global variables. Pseudo-example: ["A", "B", "C"].each {|e| p [e, $count, $begin, $end] } ["A", 0, 0, 2] ["B", 1, 0, 2] ["C", 2, 0, 2] T.