Outer Product

, or Table is a monadic operator, which will produce a dyadic function when applied with a dyadic function. Outer product applies the operand function on each element of the left array with each element of the right array. It can be described as a shortcut for constructing nested for loops.

Syntax
Outer Product differs from all other monadic operators, which are written as a single glyph, with the operand on the left. For historical reasons, the outer product operator is a bi-glyph denoted as, and its appears on the right.

This syntactical inconsistency is resolved in J and BQN, where the outer product operator, called Table, and denoted  and   respectively, has the usual operator syntax.

Applications
Outer product is useful for solving problems that intuitively require a polynomial time algorithm. This may also indicate that such an algorithm is not the fastest solution.

For example, suppose we want to find duplicated elements in an non-nested array. Intuitively speaking, the easiest way to solve this problem is to compare each element of the array with all other elements, which is exactly what an outer product does. Using similar techniques, we can define a function that generates prime numbers by using an outer product of Residue. Here there are faster solutions such as the Sieve of Eratosthenes.

Documentation

 * Dyalog
 * APLX
 * J Dictionary, NuVoc
 * BQN