<div dir="ltr"><br><br><div class="gmail_quote">On Wed, May 20, 2015 at 9:58 AM Håkan Mattsson <<a href="mailto:hm@tail-f.com">hm@tail-f.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">On Tue, May 19, 2015 at 5:27 AM, Richard A. O'Keefe <span dir="ltr"><<a href="mailto:ok@cs.otago.ac.nz" target="_blank">ok@cs.otago.ac.nz</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span></span><br>
If it weren't for the "concurrent" bit I'd suggest that<br>
one of the set or dictionary data structures in stdlib<br>
might be useful, or one of the Okasaki purely functional<br>
data structures that I thought had been adapted to<br>
Erlang, but can't find.<br></blockquote><div><br><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Perhaps you ar looking for the queue module?<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">It is quite useful when you want to have a list where popping elements from the tail is efficient.<br></div><br clear="all"><div><div><div dir="ltr">/Håkan<br><br></div></div></div></div></div></div></div></blockquote><div><br></div><div>Thanks all for your answers, it's really useful </div><div><br></div><div>In fact I wasn't thinking directly to use ETS at first. The geneeral idea was indeed to have a sort of queue (pop or tail functions) but with the ability to remove one item from it if needed with a performance better than O(N). Which is if I understand correctly the case with  a list. In my understanding a skip list algorithm would do the trick. Maybe there are another data-structure for it that would work better with Erlang?</div><div><br></div><div>- benoit</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div><div><div dir="ltr"></div></div></div> 
<br></div></div></div></div>
</blockquote></div></div>