From: ts Date: 2003-11-21T03:11:28+09:00 Subject: Re: [ann] iterator 0.1 >>>>> "N" == Nikolai Weibull writes: N> * Simon Strandgaard [Nov, 20 2003 17:40]: >> We are curios to hear what your first-impression are, What do >> you want from 'iterator.rb'? What are your requirements? N> my first impression is that you must really, really love iterators ;-) N> anyway, may be interesting to see how useful this is. this may be N> something to integrate into (or other way around perhaps? ;-) RDSL Well, the problem is that it exist something similar in 1.8.1 # == Overview # # This library provides the Generator class, which converts an # internal iterator (i.e. an Enumerable object) to an external # iterator. In that form, you can roll many iterators independently. svg% grep 'def ' generator.rb def initialize(enum = nil, &block) def yield(value) def end?() def next?() def index() def pos() def next() def current() def rewind() def each def initialize(*enums) def size def length def end?(i = nil) def each def test_block1 def test_block2 def test_each def test_each svg% Guy Decoux