[erlang-questions] how are implemented lists?
Fri May 22 09:04:21 CEST 2015
On Thu, May 21, 2015 at 04:00:36PM +0000, Benoit Chesneau wrote:
> 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?
Have a look at the brand new map data type.
> - benoit
> erlang-questions mailing list
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
More information about the erlang-questions