Peter Scott wrote:
> In article <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] (R. Joseph Newton) writes:
>> Peter Scott wrote:
>>
>>> I$^I = ".bak";
>>> my @queue;
>>
>> Hmmm.
>>
>> push (@queue, $somevar);
>> somevar = pop(@queue);
>>
>> ...and double-Hmmmm!
>>
>> Could it be that that animal Perlites refer to as an array is really
>> a linked list?
>
> It's both.  It can do everything a linked list can, and it can do
> everything an array can.  All this in a single syntax!

It's actually a 'deque', or double-ended queue (Knuth), with push/pop
working at one end and shift/unshift at the other. A deque
can be used as any of the lesser list forms but not as a linked list,
which provides insert and delete anywhere in the length of the list
without shifting existing data.

Cheers,

Rob




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to