title: How to forward an iterator?
body: <p>I've got this little class:</p>
  
  <pre><code>class FreqDict&lt;K&gt; {
      private readonly map: Map&lt;K,number&gt;
  
      constructor() {
          this.map = new Map;
      }
  
      inc(key: K): void {
          const n = this.map.get(key);
          this.map.set(key, n ? n+1 : 1);
      }
  
      *[Symbol.iterator]() {
          for(const item of this.map) {
              yield item;
          }
      }
  
      entries() {
          return Array.from(this.map.entries())
      }
  }
  
  </code></pre>
  
  <p>You can see how I've implemented the iterator, and that works fine, but <code>this.map</code> already has an iterator. Can't I just return/forward it? I'm not sure what the proper syntax is. <code>return this.map[Symbol.iterator]</code> doesn't seem to work.</p>