10 Aug
2010
10 Aug
'10
12:42 a.m.
Hello,
Sometimes it's useful to get the number of elements yield by an iterator. For example (if ilen is the name of the function):
A generic iterator is something that inherently, by definition, has unknown and unpredictable length (think, for example, about berries you gather in a forest). There is no guarantee two tries give the same results, there isn't even a guarantee that it's finite. You just can't, absolutely, by any means, know its length otherwise than by exhausting it. If you can, it's not a generic iterator but something else. -- Regards, Ivan mailto:vano@mail.mipt.ru