docs: function functionIterator(fn) {
    return function* () {
      let current;
      let index = 0;
  
      for (;;) {
        current = fn(index++, current);
        if (current === undefined) {
          break;
        }
        yield current;
      }
    }();
  }