public function map(Closure $func)
    {
        return new static($this->type, $this->elements->map($func)->toArray());
    }
public function map(Closure $func)
    {
        return new static($this->type, $this->elements->map($func)->toArray());
    }
public function map ( Closure $ func ) { return new static ( $ this -> type , $ this -> elements -> map ( $ func ) -> toArray ( ) ) ; }
Applies the given public function to each element in the collection and returns
a new collection with the elements returned by the public function.

@param Closure $func

@return Collection
Applies the given public function to each element in the collection and returns a new collection with the elements returned by the public function .