Re: AA insertion order iteration

2011-02-14 Thread Steven Schveighoffer
On Mon, 14 Feb 2011 16:39:24 -0500, spir wrote: On 02/14/2011 03:27 PM, Steven Schveighoffer wrote: On Mon, 14 Feb 2011 06:31:25 -0500, spir wrote: Hello, How would you wrap an AA to allow memorising insertion order, and be able to use it for iteration? * Indeed, one could store keys i

Re: AA insertion order iteration

2011-02-14 Thread spir
On 02/14/2011 03:27 PM, Steven Schveighoffer wrote: On Mon, 14 Feb 2011 06:31:25 -0500, spir wrote: Hello, How would you wrap an AA to allow memorising insertion order, and be able to use it for iteration? * Indeed, one could store keys in a // (ordered) array. But this means iteration requi

Re: AA insertion order iteration

2011-02-14 Thread Steven Schveighoffer
On Mon, 14 Feb 2011 06:31:25 -0500, spir wrote: Hello, How would you wrap an AA to allow memorising insertion order, and be able to use it for iteration? * Indeed, one could store keys in a // (ordered) array. But this means iteration requires a series of lookups by key. * A slightly bette

AA insertion order iteration

2011-02-14 Thread spir
Hello, How would you wrap an AA to allow memorising insertion order, and be able to use it for iteration? * Indeed, one could store keys in a // (ordered) array. But this means iteration requires a series of lookups by key. * A slightly better method would be to store hash values, which anyway