Efficient conversion from String[] to F# List

后端 未结 3 1799
一个人的身影
一个人的身影 2021-01-12 14:57

I\'m coming to F# from a C# background and a little behind on the different lists and collections. I recently ran into a case where I needed to go from a string[] to \'T lis

3条回答
  •  清歌不尽
    2021-01-12 15:05

    Here's another way to do it:

    let listOfLines = [yield! File.ReadAllLines(@"C:\LinesOText.txt")]
    

提交回复
热议问题