Handbook
Glossary
$sequence ( element -- )
Factor handbook
»
Developer tools
»
Help system
»
Writing documentation
»
Element types
»
Block elements
Prev:
$quotation ( element -- )
Next:
$low-level-note ( children -- )
Vocabulary
help
.
markup
Inputs
element
an array of element types
Outputs
None
Word description
Produces the text "a sequence of
element types
".
Examples
{ $sequence number } print-element
a
sequence
of
number
s
{ $sequence real complex } print-element
a
sequence
of
real
s or
complex
s
{ $sequence rational float complex } print-element
a
sequence
of
rational
s,
float
s, or
complex
s
{ $sequence integer ratio float complex } print-element
a
sequence
of
integer
s,
ratio
s,
float
s, or
complex
s
{ $sequence fixnum bignum ratio float complex } print-element
a
sequence
of
fixnum
s,
bignum
s,
ratio
s,
float
s, or
complex
s
Definition
USING:
combinators
kernel
sequences
;
IN:
help.markup
:
$sequence
( element -- )
{
"a "
{
$link
sequence
}
" of "
}
print-element
dup
length
{
{
1
[
first
($instances)
]
}
{
2
[
first2
[
($instances)
" or "
print-element
]
[
($instances)
]
bi*
]
}
[
drop
unclip-last
[
[
($instances)
", "
print-element
]
each
]
[
"or "
print-element
($instances)
]
bi*
]
}
case
;