I have a seq of seqs in FSharp. I want to join a seq to the previous one if a predicate returns to true for it.
Sample:
let items = seq [seq[2;3;4];seq[1;5;6;7;1;9];seq[2;3;5;7]]
I want to join a seq to the previos one, if the seq starts by 1, so the result should be in this case:
seq [seq[2;3;4;1;5;6;7;1;9];seq[2;3;5;7]
]
Is there any nice functional way to do it?
I am just started to translate my long computation processes from C# to F# and very impressed by the performance improvement I could achieve after even a very few hours of work and my beginner level knowledge of FSharp.
I have bought a book from Amazon entitled 'Beginning F#'. It is really great, but I mainly should work with seqs, lists, maps, collections now and this topic isn't explained as detailed as I need. Would anyone be so kind to advise me a good resource about ths topics?
Thx in advance!