Handbook
Glossary
(parse-weather) ( str -- str' )
Vocabulary
metar
.
private
Inputs
str
an
object
Outputs
str'
an
object
Definition
USING:
assocs
combinators
grouping
kernel
sequences
splitting
;
IN:
metar.private
:
(parse-weather)
( str -- str' )
dup
"+FC"
=
[
drop
"tornadoes or waterspouts"
]
[
dup
first
{
{
43
[
rest
"heavy "
]
}
{
45
[
rest
"light "
]
}
[
drop
f
]
}
case
[
2
group
dup
[
weather
key?
]
all?
[
[
weather
at
]
map
join-words
]
[
concat
parse-glossary
]
if
]
dip
prepend
]
if
;