public function iterate(iterable $iterable, ?int $max = null): iterable
    {
        $this->start($max ?? (\is_countable($iterable) ? \count($iterable) : 0));

        foreach ($iterable as $key => $value) {
            yield $key => $value;

            $this->advance();
        }

        $this->finish();
    }