Yukihiro Matsumoto wrote:
> It's no way to avoid entering infinite loop when you do some
> operations on infinite enumerable, such as Prime.  For example, trying
> #sort or #max on Prime, or even putting it as a splat will cause
> infinite loop.  Adding an argument or a block to #to_a does not
> improve the situation a lot, I think.
> 
>               matz.

Fair enough - but then does it make sense to have these operations 
defined?
Enumerable seems to mean the same thing as "countable", but it includes 
methods that apply to only countably finite sets.  Perhaps there should 
be a way to distinguish between sets that are countable finite and those 
that are countably infinite?  Does 1.9 include provisions for handling 
infinite lists or sets?

Thanks,
Ben Kudria
--
http://ben.kudria.net | Jabber: ben / kudria.net
-- 
Posted via http://www.ruby-forum.com/.