# extend.pairs

## extend.pairs() 🡒 U.*, table function

Generates all the ordered pairs. The first argument is a Boolean value only used as a marker to identify the table T to be extended. The second argument is a vector from a table that extends the table T. The returned table contains two vectors named First and Second. Their types match the second argument.

table Items = with
[| "a" as X, 1 as Y |]
[| "b", 2 |]
[| "c", 3 |]

table SubItems = extend.range(Items.Y)

table Pairs = extend.pairs(true into Items, SubItems.N)

show table "Ordered pairs" a1c10 with
Items.X
Pairs.First
Pairs.Second


This table function fails if the resulting table exceeds 1 billion lines.

### Signature

/// All the unordered pairs obtained from an extension table.
tablefunc extend.pairset<Items, SubItems>(
/// Only used to identify the first table.
Items.Ignored : boolean,
/// Values used to populate the returned pairs.
SubItems.Dim : same,
Items -> SubItems
) : {
First : same,
Second : same
} as "extend.pairset"