From: Akinori MUSHA Date: 2008-12-12T19:32:44+09:00 Subject: [ruby-core:20499] [Feature #709](Rejected) Enumerator#+ Issue #709 has been updated by Akinori MUSHA. Status changed from Open to Rejected Assigned to changed from Yukihiro Matsumoto to Akinori MUSHA To tell the truth, I was also tempted to add something like that and you are not alone. You might as well add: class Enumerator alias * cycle def -@ Enumerator.new { |y| to_a.reverse_each { |i| y << i } } end end and have fun with them as follows: e = -[1,4,7].each * 3 + ("a".."c").each p e.to_a #=> [3, 2, 1, 3, 2, 1, 3, 2, 1, "a", "b", "c"] However, I am yet to think that even the addition of enumerators is so commonly in need. Besides, as you said, operators must be carefully chosen and defined so that they work consistently and systematically and they look intuitive and practical, all at the same time. We should also think how other types of iterators should be introduced, such as bidirectional iterators and indexable iterators, before defining a variety of operators for the current Enumerator. So, my answer here, for now, is the block based enumerator. Just as you have aptly shown, you can define anything you like with it without the need for predefined operators. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/709 ---------------------------------------- http://redmine.ruby-lang.org