www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - DList efficiency

reply Boris-Barboris <ismailsiege gmail.com> writes:
Good day to you reader! I have a couple questions about Phobos:
1). Do I understand correctly, that there is currently no way 
(aside from editing the sources of course) to efficiently (using 
one underlying iteration) remove all\first element(s) from DList 
based on a predicate? Can such operation be performed for arrays 
using std.algorithm (though in array case it can at least be done 
manually)?
2). Was the idea of range types, that allow underlying structure 
modification ever considered ("remove element from the collection 
being iterated and shift to next element" is first candidate).
3). Is there a container library featuring alternative concepts, 
namely, iterators?
Jun 08 2017
parent Boris-Barboris <ismailsiege gmail.com> writes:
On Thursday, 8 June 2017 at 22:42:14 UTC, Boris-Barboris wrote:
 1). Do I understand correctly, that there is currently no way 
 (aside from editing the sources of course) to efficiently 
 (using one underlying iteration) remove all\first element(s) 
 from DList based on a predicate?
Oh, sorry, I guess I didn't search thoroughly enough: https://github.com/dlang/phobos/blob/master/std/container/dlist.d#L769
Jun 08 2017