title: Library for reading csv file in F#
body: <p>F#</p>
  
  <p>I am interested to read a csv file and output a List&lt; List&lt; string > ></p>
  
  <pre><code>let readCsv (filepath:string) : string list list =
  //.......................
  
  input file:
  Quote1,Quote2,Quote3
  "Hello,World","He said:""Yes""",Example
  
  Output:
  // Type: string list list
  [["Quote1";"Quote2";"Quote3"];
   ["Hello,World"; "He said:"Yes"";"Example"]] 
  
  Input2:
  1,2,3,4,5,6
  7,8,9,10,11,12
  
  Output2:
  // Type: string list list
  [["1";"2";"3";"4";"5";"6"];
   ["7";"8";"9";"10";"11";"12"]]
  </code></pre>
  
  <p>However, some of the Nuget packages, e.g. CsvHelper, FileHelper, F#Data relies on defining a Class to "capture" the data, or defining a type by referring to a csv file.</p>
  
  <p><a href="https://joshclose.github.io/CsvHelper/" rel="noreferrer">https://joshclose.github.io/CsvHelper/</a></p>
  
  <p><a href="http://www.filehelpers.net/example/QuickStart/ReadWriteRecordByRecord/" rel="noreferrer">http://www.filehelpers.net/example/QuickStart/ReadWriteRecordByRecord/</a></p>
  
  <p><a href="http://fsharp.github.io/FSharp.Data/index.html" rel="noreferrer">http://fsharp.github.io/FSharp.Data/index.html</a></p>
  
  <p>For example:</p>
  
  <pre><code>// In C#, from FileHelper Documentation
  [DelimitedRecord(",")]
  public class AbstractClass
  {
      public string Quote1;
      public string Quote2;
      public string Quote3;
  }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>// F# Data Documentation
  type AbstractType = CsvProvider&lt;"../example.csv"&gt;
  </code></pre>
  
  <p>But the input file may change in number of columns (and so I cannot define an abstract class)</p>
  
  <p>Of course, I can just write regular expression to break up the input file line-by-line, but I am interested to know if someone else has already done it (or is it a standard library function).</p>
  
  <p>Thank you.</p>