From: John Carter Date: 2004-08-12T06:49:19+09:00 Subject: Re: empty? and size in Enumerable On Tue, 10 Aug 2004, Michael Neumann wrote: >> module Enumerable >> # O(n) >> def size >> inject(0) {|s,| s+1} >> end >> end >> > Hehe, and how long does it take to determine the size of infinite or cyclic > Enumerable's? ;-) Not nearly as long as Enumerable::sort does already... John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter@tait.co.nz New Zealand The universe is absolutely plastered with the dashed lines exactly one space long.