public static function power(Set $a) : array
    {
        $power = [new self()];

        foreach ($a as $multiplicand) {
            foreach ($power as $multiplier) {
                $power[] = new self(array_merge([$multiplicand], $multiplier->toArray()));
            }
        }

        return $power;
    }
public static function power(Set $a) : array
    {
        $power = [new self()];

        foreach ($a as $multiplicand) {
            foreach ($power as $multiplier) {
                $power[] = new self(array_merge([$multiplicand], $multiplier->toArray()));
            }
        }

        return $power;
    }
public static function power ( Set $ a ) : array { $ power = [ new self ( ) ] ; foreach ( $ a as $ multiplicand ) { foreach ( $ power as $ multiplier ) { $ power [ ] = new self ( array_merge ( [ $ multiplicand ] , $ multiplier -> toArray ( ) ) ) ; } } return $ power ; }
Creates the power set of A.

@param Set $a

@return Set[]
Creates the power set of A .