Handbook
Glossary
(storage>n) ( string multiplier base -- n )
Vocabulary
units
.
reduction
Inputs
string
an
object
multiplier
an
object
base
an
object
Outputs
n
an
object
Definition
USING:
assocs
kernel
math
math.functions
math.parser
sequences
;
IN:
units.reduction
::
(storage>n)
( string multiplier base -- n )
string
last
unit-suffix-hash
?at
[
:>
unit string
but-last
string>number
[
"not a number"
throw
]
unless*
multiplier unit
*
base
swap
^
*
]
[
"unrecognized unit"
throw
]
if
;