Re: C C and lazyness

2004-07-04 Thread Luke Palmer
David Storrs writes: > On Sat, Jul 03, 2004 at 01:02:34AM -0600, Luke Palmer wrote: > > > But indeed there are cases where it is a problem: > > > > my $x = 2; > > sub mklist () { > > return map { 2 * $_ } 0..10; > > } > > > > my @list = mklist; > > say @list[0..4];

Re: C C and lazyness

2004-07-04 Thread David Storrs
On Sat, Jul 03, 2004 at 01:02:34AM -0600, Luke Palmer wrote: > But indeed there are cases where it is a problem: > > my $x = 2; > sub mklist () { > return map { 2 * $_ } 0..10; > } > > my @list = mklist; > say @list[0..4]; # 0 2 4 6 8 > $x = 1; > say @list;