src/Heterogeny/Seq.php
public function mapWithIndex(callable $function)
    {
        $values = array_values($this->data);

        return new Seq(array_map($function, array_keys($values), $values));
    }
public function mapWithIndex(callable $function)
    {
        $values = array_values($this->data);

        return new Seq(array_map($function, array_keys($values), $values));
    }
public function mapWithIndex ( callable $ function ) { $ values = array_values ( $ this -> data ) ; return new Seq ( array_map ( $ function , array_keys ( $ values ) , $ values ) ) ; }
Map over each `Seq` item with index

@param callable $function map function

@return static
Map over each Seq item with index