How do I concatenate a list of string option?
let m = [ ""; "12"; "a"; "b"]
// I can join these with
m |> List.toSeq |> String.concat "\n"
// now I got a list of string option list
let l = [Some ""; None; Some "a"; Some "b"]
l |> List.toSeq |> ????
you first use List.choose to "extract" the Some values of the list :
l |> List.choose id |> String.concat "\n"
Note you don't need List.toSeq as seq is an alias for IEnumerable and 't list implement it already.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With