public function map(Closure $callback)
    {
        $hash = $this->create();

        $this->each(function ($value, $key) use ($callback, $hash) {
            $hash[] = $callback($value, $key);
        });

        return $hash;
    }
public function map(Closure $callback)
    {
        $hash = $this->create();

        $this->each(function ($value, $key) use ($callback, $hash) {
            $hash[] = $callback($value, $key);
        });

        return $hash;
    }
public function map ( Closure $ callback ) { $ hash = $ this -> create ( ) ; $ this -> each ( function ( $ value , $ key ) use ( $ callback , $ hash ) { $ hash [ ] = $ callback ( $ value , $ key ) ; } ) ; return $ hash ; }
Maps elements into a new Hash

@param Closure $callback

@return Hash
Maps elements into a new Hash