[erlang-questions] how are implemented lists?

Benoit Chesneau <>
Thu May 21 18:00:36 CEST 2015


On Wed, May 20, 2015 at 9:58 AM Håkan Mattsson <> wrote:

> On Tue, May 19, 2015 at 5:27 AM, Richard A. O'Keefe <>
> wrote:
>
>>
>> If it weren't for the "concurrent" bit I'd suggest that
>> one of the set or dictionary data structures in stdlib
>> might be useful, or one of the Okasaki purely functional
>> data structures that I thought had been adapted to
>> Erlang, but can't find.
>>
>
> Perhaps you ar looking for the queue module?
>
> It is quite useful when you want to have a list where popping elements
> from the tail is efficient.
>
> /Håkan
>
>
Thanks all for your answers, it's really useful

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?

- benoit


>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150521/e87f67a5/attachment.html>


More information about the erlang-questions mailing list