src/Observable.php
public function mapWithIndex(callable $selector): Observable
    {
        $index = 0;
        return $this->map(function ($value) use ($selector, &$index) {
            return $selector($index++, $value);
        });
    }
public function mapWithIndex(callable $selector): Observable
    {
        $index = 0;
        return $this->map(function ($value) use ($selector, &$index) {
            return $selector($index++, $value);
        });
    }
public function mapWithIndex ( callable $ selector ) : Observable { $ index = 0 ; return $ this -> map ( function ( $ value ) use ( $ selector , & $ index ) { return $ selector ( $ index ++ , $ value ) ; } ) ; }
Maps operator variant that calls the map selector with the index and value

@param callable $selector
@return Observable

@demo map/mapWithIndex.php
@operator
@reactivex map
Maps operator variant that calls the map selector with the index and value