std.container & ranges
Steven Schveighoffer
schveiguy at yahoo.com
Thu Nov 3 14:35:38 PDT 2011
On Thu, 03 Nov 2011 14:50:31 -0400, Timon Gehr <timon.gehr at gmx.ch> wrote:
> On 11/03/2011 07:15 PM, Steven Schveighoffer wrote:
>>
>> I could use this idea, I think, to implement a singly linked list in
>> dcollections as well (the prospect of not having O(1) removal is what
>> has stopped me). Thanks for the idea!
>>
>
> Nice!
Looking at dcollections' List interface, the one thing I can't implement
is back() (i.e. get the last element in the list). I can implement
everything else. It might be worth it to make an exception for this (i.e.
just throw if someone calls back()) in order to have a singly-linked list
implementation.
-Steve
More information about the Digitalmars-d-learn
mailing list