original_string: public static function cartesian(Set $a, Set $b) : array
      {
          $cartesian = [];
  
          foreach ($a as $multiplier) {
              foreach ($b as $multiplicand) {
                  $cartesian[] = new self(array_merge([$multiplicand], [$multiplier]));
              }
          }
  
          return $cartesian;
      }
code: public static function cartesian(Set $a, Set $b) : array
      {
          $cartesian = [];
  
          foreach ($a as $multiplier) {
              foreach ($b as $multiplicand) {
                  $cartesian[] = new self(array_merge([$multiplicand], [$multiplier]));
              }
          }
  
          return $cartesian;
      }
code_tokens: public static function cartesian ( Set $ a , Set $ b ) : array { $ cartesian = [ ] ; foreach ( $ a as $ multiplier ) { foreach ( $ b as $ multiplicand ) { $ cartesian [ ] = new self ( array_merge ( [ $ multiplicand ] , [ $ multiplier ] ) ) ; } } return $ cartesian ; }
docstring: Creates the Cartesian product of A and B.
  
  @param Set $a
  @param Set $b
  
  @return Set[]
docstring_tokens: Creates the Cartesian product of A and B .