[Prototype-core] Re: A Lightweight Set

2007-07-19 Thread Tobie Langel
> Or said another way, I can't store "keys", "values", "map", "find", etc in a > Hash (unless I'm missing something clever). Yes you can... but they override the existing methods. So for example: $H({map: 2}) works as expected except you won't be able to use map or any method that relies on it

[Prototype-core] Re: A Lightweight Set

2007-07-19 Thread Jeff Watkins
> Wouldn't those methods be a better fit for the Enumerables or Hash ? Both Hash and Enumerable add numerous keys to the "set". Or said another way, I can't store "keys", "values", "map", "find", etc in a Hash (unless I'm missing something clever). --~--~-~--~~~-

[Prototype-core] Re: A Lightweight Set

2007-07-19 Thread Tobie Langel
Hi Jeff, Wouldn't those methods be a better fit for the Enumerables or Hash ? Regards, Tobie On Jul 20, 1:04 am, Jeff Watkins <[EMAIL PROTECTED]> wrote: > I've often found myself using an object literal as a Set and after > wishing I had some real Set operators, I finally found the time to