The Table is at the heart of Planarly

The basic unit in the Planarly programming language is the table. A table is a 2 dimensional rectangular grid of values. The smallest table is a 1x1 table - a single cell.

A table is an abstract data structure. Don't confuse it with the grid of cells in a spreadsheet. In Planarly that is called a Region, which will be covered shortly.

Values in a table can be one of the following types:

Tables can contain any combination of types.

The dimensions of a table are always written as (height, width) which is (rows, columns).

Representing tables in code

Almost everything in Planarly is a table. E.g. 1 is a table of dimension 1x1 and its only cell contains the value 1.

The operator & concatenates two tables side by side and the operator \\\\ stacks one table on top of another. & has a higher precedence than \\\\. This allows you to construct inline tables :

$$ \begin{array}{c|c} 1 & 2 \\ \hline 3 & 4 \end{array} $$

$$ \begin{array}{c|c|c} background & yellow & gray\\

\end{array} $$