function recursiveUnfold (callable $fn, $keepOriginals = false)
  {
    $w = function ($v, $k, $d) use ($fn, &$w, $keepOriginals) {
      $r = $fn ($v, $k, $d);
      if (is_iterableEx ($r)) {
        $it = new UnfoldIterator (new MapIterator ($r, $w, $d + 1), UnfoldIterator::USE_ORIGINAL_KEYS);
        return $keepOriginals
          ? new HeadAndTailIterator ($v, $it, $k, true, true)
          : $it;
      }
      return $r;
    };
    $this->map ($w, 0)->unfold ();
    return $this;
  }