change-groups ( seq -- groups )


Vocabulary
metar.private

Inputs
seqan object


Outputs
groupsan object


Definition


:: 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 ;