parse-speed ( str units -- str'/f )


Vocabulary
metar.private

Inputs
stran object
unitsan object


Outputs
str'/fan object


Definition


: parse-speed ( str units -- str'/f )
[ string>number ] dip [
dup "knots" =
[ drop dup kt>mph "%s knots (%.1f mph)" sprintf ]
[ "%s %s" sprintf ] if
] curry [ f ] if* ;