public function mapWithIndex(callable $selector): Observable
    {
        $index = 0;
        return $this->map(function ($value) use ($selector, &$index) {
            return $selector($index++, $value);
        });
    }