public function union(Value $set)
    {
        $union = $this->value;

        /** @var Value $arg */
        foreach (func_get_args() as $arg) {
            /** @var array $convertedArg */
            $convertedArg = $arg->getSet()->getValue();
            $union = array_merge($union, array_diff($convertedArg, $union));
        }

        return new self($union);
    }
public function union(Value $set)
    {
        $union = $this->value;

        /** @var Value $arg */
        foreach (func_get_args() as $arg) {
            /** @var array $convertedArg */
            $convertedArg = $arg->getSet()->getValue();
            $union = array_merge($union, array_diff($convertedArg, $union));
        }

        return new self($union);
    }
public function union ( Value $ set ) { $ union = $ this -> value ; /** @var Value $arg */ foreach ( func_get_args ( ) as $ arg ) { /** @var array $convertedArg */ $ convertedArg = $ arg -> getSet ( ) -> getValue ( ) ; $ union = array_merge ( $ union , array_diff ( $ convertedArg , $ union ) ) ; } return new self ( $ union ) ; }
Set union operator.

Returns a Set which is the union of this Set with all passed Sets.

@param Value $set,...

@return Set
Set union operator .