Handbook
Glossary
change-groups ( seq -- groups )
Vocabulary
metar
.
private
Inputs
seq
an
object
Outputs
groups
an
object
Definition
USING:
arrays
kernel
math
regexp
sequences
splitting
;
IN:
metar.private
::
change-groups
( seq -- groups )
V{
}
clone
:>
indices seq
[|
token i |
token
re-from-timestamp
matches?
token
{
"BECMG"
"NOSIG"
"PROB30"
"PROB40"
}
member?
or
token
"TEMPO"
=
i 1
-
seq
?nth
{
"PROB30"
"PROB40"
}
member?
not
and
or
[
i indices
push
]
when
]
each-index
seq indices
>array
split-indices
harvest
;