Handbook
Glossary
format-box ( table -- seq )
Vocabulary
strings
.
tables
Inputs
table
an
object
Outputs
seq
an
object
Definition
USING:
kernel
make
math
sequences
strings.tables.private
;
IN:
strings.tables
:
format-box
( table -- seq )
format-cells
[
{
}
]
[
dup
length
1
-
over
[
format-column
]
change-nth
flip
[
[
[
" │ "
join
"│ "
" │"
surround
]
map
]
[
first
[
cell-length
9472
<repetition>
]
map
]
bi
[
"─┬─"
join
"┌─"
"─┐"
surround
,
]
[
"─┼─"
join
"├─"
"─┤"
surround
[
,
]
curry
[
,
]
interleave
]
[
"─┴─"
join
"└─"
"─┘"
surround
,
]
tri
]
{
}
make
]
if-empty
;