What is the formal name in type theory of the operation that creates a "matrix of types" from product types (such as std::tuple in C++)?

For example if we consider std::tuple<int, float, char> t1 and std::tuple<std::string, double> t2 (in C++, but the same question remains for any product type in any language), what would the name of the operation that would construct the following matrix of product types:

  • int, std::string
  • int, double
  • float, std::string
  • float, double
  • char, std::string
  • char, double
  • $\begingroup$ What do you mean by "matrix of types"? Perhaps provide an example. $\endgroup$ Jun 5, 2017 at 6:42
  • $\begingroup$ That is a type containing the tuples I listed (6 product types with 2 values each) $\endgroup$
    – Vincent
    Jun 5, 2017 at 8:33
  • $\begingroup$ That's just a tuple of tuples. $\endgroup$ Jun 5, 2017 at 9:24
  • $\begingroup$ I am more speaking of the operation, not the type $\endgroup$
    – Vincent
    Jun 5, 2017 at 17:56
  • $\begingroup$ Do you mean? std::tuple<std::tuple<int, std::string>, std::tuple<int, double>, std::tuple<float, std::string>, std::tuple<float, double>, std::tuple<char, std::string>, std::tuple<char, double>>? $\endgroup$ Jun 5, 2017 at 20:04


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.