Remove element from DList

Jonathan M Davis jmdavisProg at gmx.com
Sat Oct 6 22:09:12 PDT 2012


On Sunday, October 07, 2012 06:54:25 cal wrote:
> > On Sunday, 7 October 2012 at 01:14:48 UTC, Jonathan M Davis
> > wrote:
> > Regardless, it's a bug that normal remove doesn't work with the
> > result of take.
> 
> I guess this is also true of insertAfter and co? Should they
> accept the result of take? (Currently they don't)

Any function on a container in std.container which takes a range from that 
container should accept the result of take or takeExactly. It's something that 
was overlooked in the initial design and added later, so it hasn't necessarily 
been added consistently. But without it, those functions can't operate on the 
an element or elements in a range without operating on every element after 
them in the entire container.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list