Re: Double ended arrays?

2017-10-07 Thread Ali Çehreli via Digitalmars-d-learn
On 10/07/2017 05:02 PM, Steven Schveighoffer wrote: > https://github.com/schveiguy/dcollections/blob/master/dcollections/Deque.d > > It's implemented by maintaining 2 dynamic arrays, one that is "reversed" > at the front, and one that is normal at the back. When you prepend, it > appends to

Re: Double ended arrays?

2017-10-07 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/7/17 3:38 AM, Chirs Forest wrote: I have some data that I want to store in a dynamic 2d array... I'd like to be able to add elements to the front of the array and access those elements with negative integers as well as add numbers to the back that I'd acess normally with positive

Re: Double ended arrays?

2017-10-07 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, October 07, 2017 07:38:47 Chirs Forest via Digitalmars-d-learn wrote: > I have some data that I want to store in a dynamic 2d array... > I'd like to be able to add elements to the front of the array and > access those elements with negative integers as well as add > numbers to the

Re: Double ended arrays?

2017-10-07 Thread Ilya Yaroshenko via Digitalmars-d-learn
On Saturday, 7 October 2017 at 07:38:47 UTC, Chirs Forest wrote: I have some data that I want to store in a dynamic 2d array... I'd like to be able to add elements to the front of the array and access those elements with negative integers as well as add numbers to the back that I'd acess

Double ended arrays?

2017-10-07 Thread Chirs Forest via Digitalmars-d-learn
I have some data that I want to store in a dynamic 2d array... I'd like to be able to add elements to the front of the array and access those elements with negative integers as well as add numbers to the back that I'd acess normally with positive integers. Is this something I can do, or do I