All predicatesShow sourcetable.pl -- SWISH table renderer

Render table-like data.

Source term_rendering(+Term, +Vars, +Options)//
Renders Term as a table. This renderer recognises several representations of table-like data:

$ A list of dicts holding the same keys

A list of terms of equal arity
A list of lists of equal length

Options:

header(+Header)
Specify the header row. This is either a row whose number of columns must match the columns in the table or the atom first_row, which causes the first row to be used as header. Multiple header options may be present. The first matching row is used, next the first_row value and if nothing matches no header is displayed.
align(+Alignment)
Specify the column alignment as one of l, c or r or the more verbose left, center, right. Default is left, except for columns holding only integers.
To be done
- : recognise more formats
Source fix_op_priority(+Options0, -Options)[private]
Bindings a normally printed with priority 699 (the right hand limit for =/2). This is rather meaningless for tables. We therefore map 699 to 1200. We should preserve a user value given with use_rendering/2, but we cannot distinguish this from higher up defaults.
Source transpose_table(+Table, -Columns)[private]
Transpose the table to a list of columns, each column being a list of cells.
Source nat_digits(+Number, -Digits)[private]
Determine the number of digits that should naturally be displayed for a number.
Source header(+Table, -Rows, -Header:list(Term), +Options, -RestOptions) is semidet[private]
Compute the header to use. Fails if a header is specified but does not match.
Source header_row(ColNames:list)// is det[private]
Include a header row if ColNames is not unbound.
Source is_list_of_terms(@Term, -Rows, -Cols) is semidet[private]
Recognises a list of terms with the same functor and non-zero arity.
Source is_list_of_dicts(@Term, -Rows, -ColNames) is semidet[private]
True when Term is a list of Rows dicts, each holding ColNames as keys.
Source is_list_of_lists(@Term, -Rows, -Cols) is semidet[private]
Recognise a list of lists of equal length.