up previous next
tuples    --    N-tuples


Syntax
tuples(S: LIST, N: INT): LIST

Description
This function computes all N-tuples with entries in S. It is equivalent to S >< S >< ... >< S [N times].

Example
/**/  tuples([1, 4, 7], 2);
[[1, 1], [1, 4], [1, 7], [4, 1], [4, 4], [4, 7], [7, 1], [7, 4], [7, 7]]

See Also