We need to rethink remove in std.container

Steven Schveighoffer schveiguy at yahoo.com
Tue Feb 22 10:44:58 PST 2011


On Tue, 22 Feb 2011 08:58:04 -0500, Steven Schveighoffer  
<schveiguy at yahoo.com> wrote:

> So essentially, your code would look like this in dcollections:
>
> auto arr = new ArrayList!int(1,2,3,4,5);
>
> auto cursor = arr.find(3);
>
> int[] before = arr[0..cursor];
> int value = arr[cursor];


Actually, I haven't used dcollections (or much d code) in so long, I  
forgot the cursor's main function!

int value = cursor.front;

That looks better ;)

-Steve


More information about the Digitalmars-d mailing list