public function map(Callable $f) : Collection {
        try {
            return new static(array_map($f, $this->items));
        } catch (\Exception $e) {
            return new Collection(array_map($f, $this->items));
        }
    }
public function map(Callable $f) : Collection {
        try {
            return new static(array_map($f, $this->items));
        } catch (\Exception $e) {
            return new Collection(array_map($f, $this->items));
        }
    }
public function map ( Callable $ f ) : Collection { try { return new static ( array_map ( $ f , $ this -> items ) ) ; } catch ( \ Exception $ e ) { return new Collection ( array_map ( $ f , $ this -> items ) ) ; } }
return a new instance of this collection with values that
have been transformed by the provided function.

if the values conform to the defined type for this collection
then the new collection instance will be of the same type
as the original.

if the values do not conform to the defined type then a
generic untyped collection will be returned instead.

@param callable $f
@return Collection
return a new instance of this collection with values that have been transformed by the provided function .