I have a sequence pairwise like: Original = [(0,0); (1,2); (3,4)] I would like to convert this seq of (int *int) to a seq of int Final= [0,0,1,2,3,4] Can anyone please suggest me the way to do this ?
Use List.collect
[(0,0); (1,2); (3,4)] |> List.collect (fun (x,y) -> [x; y])
In your question you say you want a List at the beginning but at the end you say Sequence, anyway for sequences collect is also available.
For more information collect
is the monadic function bind or the operator >>=
in some languages (SelectMany in C#) which for lists/sequences is equivalent to a map followed by a concat.