[Kc] another response to apo6 transfinite semantics challenge
david nicol
whatever at davidnicol.com
Thu Mar 13 22:37:36 CST 2003
> > However, if you access the last element using the length of the array,
> > it may try to flatten, and fail:
> >
> > my @flat = (1..Inf, 1..10);
> > $last = @flat[@flat - 1]; # Kaboom!
How about negative indices? We have negative indices in the slice()
semantics; what if
$last = @array[-1]
always worked?
--
David Nicol, independent consultant and contractor
perl -Mcoroutine0 -e'$c=new coroutine0 VARS=>[],BODY=>q"YIELD 74;
YIELD 65;YIELD 80;YIELD 72; YIELD 10;";for(;;){print chr(&$c||die)};'
More information about the kc
mailing list