[erlang-questions] how are implemented lists?
Thu May 21 18:00:36 CEST 2015
On Wed, May 20, 2015 at 9:58 AM Håkan Mattsson <hm@REDACTED> wrote:
> On Tue, May 19, 2015 at 5:27 AM, Richard A. O'Keefe <ok@REDACTED>
>> 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.
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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions