public function map(callable $closure, array $context = [])
    {
        $collection = new static();
        foreach ($this as $key => $value) {
            $collection[$key] = $closure($key, $value, $context);
        }

        return $collection;
    }
public function map(callable $closure, array $context = [])
    {
        $collection = new static();
        foreach ($this as $key => $value) {
            $collection[$key] = $closure($key, $value, $context);
        }

        return $collection;
    }
public function map ( callable $ closure , array $ context = [ ] ) { $ collection = new static ( ) ; foreach ( $ this as $ key => $ value ) { $ collection [ $ key ] = $ closure ( $ key , $ value , $ context ) ; } return $ collection ; }
Returns a Collection containing all the elements of the collection after
applying the callback function to each one.

The callable should accept three arguments:
- (string) $key
- (string) $value
- (array) $context

The callable must return a the altered or unaltered value.

@param callable $closure Map function to apply
@param array    $context Context to pass to the callable

@return Collection
Returns a Collection containing all the elements of the collection after applying the callback function to each one .