Handbook
Glossary
$or ( element -- )
Factor handbook
»
Developer tools
»
Help system
»
Writing documentation
»
Element types
»
Block elements
Prev:
$maybe ( element -- )
Next:
$quotation ( element -- )
Vocabulary
help
.
markup
Inputs
element
a markup element of shape
{ class1 class2 }
Outputs
None
Word description
Produces the text "a
class1
or
class2
" or "an
class1
or
class2
", depending on the first letter of either class name.
Definition
USING:
combinators
kernel
sequences
;
IN:
help.markup
:
$or
( element -- )
dup
length
{
{
1
[
first
($instance)
]
}
{
2
[
first2
[
($instance)
" or "
print-element
]
[
($instance)
]
bi*
]
}
[
drop
unclip-last
[
[
($instance)
", "
print-element
]
each
]
[
"or "
print-element
($instance)
]
bi*
]
}
case
;