Re: iteration (was Re: Angle quotes and pointy brackets)

2004-12-06 Thread David Green
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Matt Diephouse) wrote: On Sat, 04 Dec 2004 08:59:24 -0700, David Green [EMAIL PROTECTED] wrote: Cdoes Iterate signifies a role named Iterate. Roles are sort of a mix of interfaces and mixins (as I understand it -- I'm still waiting for E12). So

Re: iteration (was Re: Angle quotes and pointy brackets)

2004-12-04 Thread David Green
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Matt Diephouse) wrote: What I mean is that Perl takes an array and makes an iterator out of it. Sure, you probably don't think about it like that, but the behavior is the same (who says arrays need to iterate starting at element zero?). I probably

Re: iteration (was Re: Angle quotes and pointy brackets)

2004-12-04 Thread Matt Diephouse
On Sat, 04 Dec 2004 08:59:24 -0700, David Green [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Matt Diephouse) wrote: Supposing class Filehandle does Iterate; # Iterate or Iterator? we have an easy way to create new iterators. I'm not sure how useful they

Re: iteration (was Re: Angle quotes and pointy brackets)

2004-12-04 Thread Brent 'Dax' Royal-Gordon
David Green [EMAIL PROTECTED] wrote: Aren't lazy lists a funny kind of iterator? Ones that memoise their results. And supply an indexing method []. As I mentioned the other day, I fail to see any material difference between an iterator and a lazy list, except that a few operations are allowed