src/Collection.php
public function map($callback)
    {
        $values = $this->_map($callback);
        $this->setValues($values);
        return new Collection($values);
    }
public function map($callback)
    {
        $values = $this->_map($callback);
        $this->setValues($values);
        return new Collection($values);
    }
public function map ( $ callback ) { $ values = $ this -> _map ( $ callback ) ; $ this -> setValues ( $ values ) ; return new Collection ( $ values ) ; }
Applies a callback to all elements

@param callable $callback

@return Collection
Applies a callback to all elements