Converting seq<string> to string[] in F#
问题 The example from this post has an example open System.IO let lines = File.ReadAllLines("tclscript.do") |> Seq.map (fun line -> let newLine = line.Replace("{", "{{").Replace("}", "}}") newLine ) File.WriteAllLines("tclscript.txt", lines) that gives an error when compilation. error FS0001: This expression was expected to have type string [] but here has type seq<string> How to convert seq to string[] to remove this error message? 回答1: Building on Jaime's answer, since ReadAllLines() returns an