$table ( element -- ) (original) (raw)
$table ( element -- )
Factor handbook » Developer tools » Help system » Writing documentation » Element types » Block elements
Prev: | $subsection ( element -- ) |
---|
Inputs
element | an array of arrays of markup elements |
---|
Outputs
None
Word description
Prints a table given as an array of rows, where each row must have the same number of columns.
Examples
{ $table { "a" "b" "c" } { "d" "e" "f" } } print-element
a | b | c |
---|---|---|
d | e | f |
Definition
USING: help.stylesheet io.styles namespaces sequences ;
: $table ( element -- )
table-style get table-content-style get [
[ [ [ [ print-element ] with-cell ] each ] with-row ]
each
] ($grid) ;