Cartesian Product
{

Cartesian Product ({
, or @
in SAX), All, or Catalogue is a primitive monadic function that returns an array of all combinations of choices from its argument, much like Outer Product. It appears in Rationalized APL, A Dictionary of APL, SAX, and J. It shares a glyph with the dyadic function Select (like bracket indexing), which uses the same allcombinations pattern in the way it handles indices.
The argument to Cartesian Product is a boxed (nested) vector giving a list of arrays. It returns a boxed result whose shape is found by catenating all the argument array shapes, and where each result element contains one element from each argument array. In the following example from A Dictionary of APL, vectors of shapes 2, 2, and 3 (combined with Link) give a result of shape 2 2 3
.
{ 'ht'⊃'ao'⊃'gtw' ¯¯¯¯¯¯¯¯¯ haghathaw _________ ¯¯¯¯¯¯¯¯¯ hoghothow _________ ¯¯¯¯¯¯¯¯¯ tagtattaw _________ ¯¯¯¯¯¯¯¯¯ togtottow _________
Documentation
 J NuVoc, Dictionary