Given the following input sequence, I would like to generate the desired output. I know that Seq.window can be used to almost get the desired result if all the windows are a fixed length. However in this case they are not fixed legnth, I would like to start a new sequence whenever "a" is encountered. Is this possible with the standard collections library?
let inputSequence =
["a"; "b"; "c";
"a"; "b"; "c"; "d";
"a"; "b";
"a"; "d"; "f";
"a"; "x"; "y"; "z"]
let desiredResult =
[["a"; "b"; "c";]
["a"; "b"; "c"; "d";]
["a"; "b"; ]
["a"; "d"; "f";]
["a"; "x"; "y"; "z"]]