Simply b/c cons is uncommon. We want to iterate over elements once and
only once, where as cons hits on the same elements multiple times. Of
course, I see no reason cons could not look at arity too.
Maybe we should map leave alone and use the enumerable approach
coll.cons.each{ |a,b| ...
coll.slice.each { |a,b|...
I like this because I am used to "waiting" in proxy objects for what
they are really to be used later, but it might be troubling for
others.
Do you think it is a good idea to implement it in Facets first and ask
for inclusion into the core after having some more feedback from
users?
With this idea, I've been wondering about possibilities for passing
blocks that might have one, two or more block arguments --the arity
unknown to the method processing them, and how that might or might
not =A0be useful. One obvious issue is that arity > 1 produces Array
elements, whereas arity of 1 would not necessarily.
end?
Oh that's nice. I did not think you could use it for anything but
Enumerable methods. I'm not sure it matters if they are public or not.
It still can be crazy.
Yeah as long as it justs sends the symbol we cannot avoid that, but I
guess this is the price to pay for having it flexible or maybe not? I
am not an expert on Enumerator internals. But I definetely want to
enumerate over my custom iterators.
y =3D x.enum_for
to_s)
=3D> []
T.
Cheers
R.
--=20
Toutes les grandes personnes ont d=92abord =E9t=E9 des enfants, mais peu
d=92entre elles s=92en souviennent.
All adults have been children first, but not many remember.
[Antoine de Saint-Exup=E9ry]