Handbook
Glossary
option-value ( args option -- args' value )
Vocabulary
command-line
.
parser
.
private
Inputs
args
an
object
option
an
object
Outputs
args'
an
object
value
an
object
Definition
USING:
accessors
combinators
kernel
math
sequences
sequences.extras
;
IN:
command-line.parser.private
::
option-value
( args option -- args' value )
args option
option-#args
{
{
"+"
[
[
option
expected-arguments
]
[
f
swap
[
option
option-convert
]
map
]
if-empty
]
}
{
"*"
[
f
swap
[
option
option-convert
]
map
]
}
{
"?"
[
?unclip
[
option
option-convert
]
[
option
const>>
]
if*
]
}
[
[
2dup
1
-
swap
bounds-check?
[
dup
1
=
[
drop
unclip
option
option-convert
]
[
cut
swap
~quotation~
map
]
if
]
[
drop
option
expected-arguments
]
if
]
[
option
const>>
]
if*
]
}
case
;