Handbook
Glossary
select-op ( string -- word )
Vocabulary
infix
.
private
Inputs
string
an
object
Outputs
word
an
object
Definition
USING:
combinators
math
math.functions
;
IN:
infix.private
:
select-op
( string -- word )
{
{
"+"
[
[
+
]
]
}
{
"-"
[
[
-
]
]
}
{
"*"
[
[
*
]
]
}
{
"/"
[
[
/
]
]
}
{
"%"
[
[
mod
]
]
}
{
"**"
[
[
^
]
]
}
[
invalid-op
]
}
case
;