src/CartesianProduct.php
private function computeReferenceSet()
    {
        if (empty($this->sets)) {
            return;
        }

        $sets = array_reverse($this->sets);
        $this->referenceSet = array_shift($sets);

        foreach ($sets as $set) {
            $this->referenceSet = new Set($set, $this->referenceSet);
        }
    }
private function computeReferenceSet()
    {
        if (empty($this->sets)) {
            return;
        }

        $sets = array_reverse($this->sets);
        $this->referenceSet = array_shift($sets);

        foreach ($sets as $set) {
            $this->referenceSet = new Set($set, $this->referenceSet);
        }
    }
Computes the reference set used for iterate over the product.