immutable icon indicating copy to clipboard operation
immutable copied to clipboard

Add Iterators to object and array

Open hughfdjackson opened this issue 11 years ago • 0 comments

As closely as possible, provide an Iterator interface for im.object and im.array. Including:

  • Iteration over one element in a collection of n shouldn't incur O(n) penalty (i.e. no full mutable)
  • Iterating over arrays should go from 0 -> .length - 1 inclusive
  • Iterating over objects should iterate over all keys
  • Where StopIteration is available, use it; where not, throw an error

Reference: http://wiki.ecmascript.org/doku.php?id=harmony:iterators

hughfdjackson avatar May 08 '13 21:05 hughfdjackson