src/DS/Traits/TraitSequence.php
public function map(callable $callback): Sequence
    {
        $items = $this->items->map($callback);

        return $this->duplicate($items);
    }
public function map(callable $callback): Sequence
    {
        $items = $this->items->map($callback);

        return $this->duplicate($items);
    }
public function map ( callable $ callback ) : Sequence { $ items = $ this -> items -> map ( $ callback ) ; return $ this -> duplicate ( $ items ) ; }
Returns a new sequence using the results of applying a callback to each
value.

@param callable $callback

@return \PlanB\DS\Sequence
Returns a new sequence using the results of applying a callback to each value .