in-ram lists

Rémi Hérilier <>
Fri Mar 24 13:48:06 CET 2006


Damir Horvat wrote:
> On Fri, Mar 24, 2006 at 11:07:07AM +0100, Ulf Wiger (AL/EAB) wrote:
>
>   
>> Look at the 'queue' module in stdlib.
>>     
>
> Ok, found it. Tryed it. Still have questions.
>
> Q1 = queue:new().
> queue:in("item1", Q1).
> queue:in("item2", Q1).
>
> Now Q1 has only "item2". I still don't understand, how can I make a FIFO
> buffer if I can't append items to the queue to which I can refer with
> the same variable?
>
> Damir
Don't forget to get the value returned by queue:in(Item,Queue).

1> Q1 = queue:new().
{[],[]}
2> Q2 = queue:in("item1", Q1).
{["item1"],[]}
3> Q3 = queue:in("item2", Q2).
{["item2"],["item1"]}
4>

Rémi

	

	
		
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com




More information about the erlang-questions mailing list