vector should take a compile-time constant size and produce a vector of that size. tuple should do a similar thing for tuples. That is, 3 vector should produce code that constructs a vector with three elements.
It is possible to type vector dependently. Pseudocode:
define vector<s, a> (s a n elems, n :: uint -> s, a vector):
__make_vector
type elems<s, a, n>:
if (n = 0) { s } else { s a (n - 1) elems, a }
vector
should take a compile-time constant size and produce a vector of that size.tuple
should do a similar thing for tuples. That is,3 vector
should produce code that constructs a vector with three elements.It is possible to type
vector
dependently. Pseudocode: