title: Getting syntax error in ocaml
body: <p>I am trying to make a module that would allow to create a table in ocaml. It would do a query called <code>project</code> to limit the table's values. However on the last line of the definition of the function chooser I am getting syntax error.    </p>
  
  <pre><code>module type TABLE = 
  sig
    type database
    type table 
    val create_table: string list * string list* (string list) list -&gt; table
    val printTable : table -&gt; string
    val listToString : string list -&gt; string
    val project : string list * table -&gt; table
    val chooser : string list * string list-&gt; string list
  end;;
  
  module UsingTable : TABLE =
  struct 
    type table = (string list * string list* (string list) list) 
    type database = table list
    let create_table (a,b,c) = (a,b,c)
  
    let chooser inputList = (    
      for i = 0 to (List.length trueFalseList-1) do
        if List.nth trueFalseList i = "True"
        then  
          (List.nth inputList i)::ans
      done
        List.rev ans;;)
  
    let project (conditions, aTable)= (
      let rec innerProc tmp= function
          n,[],v-&gt;List.rev tmp
        |n,cH::cT,v-&gt; if List.mem cH conditions 
            then innerProc (["True"]::tmp) (n,cT,v) 
            else innerProc (["False"]::tmp) (n,cT,v) 
      in 
      let trueFalseList = innerProc [] aTable
  
  
  
  
      let rec finalListCreator = match aTable with
          n,[],[]-&gt;n,[],[]
        |n,cH::cT,[]-&gt;n,chooser cH ::finalListCreator cT,[]
        |n,c,h::t -&gt; n,c,chooser h ::finalListCreator t
  
    )
  
  
    let rec listToString aList = match aList with
        [] -&gt; ""
      | h::t -&gt; "\t"^h^"\t"^listToString t
  
  
    let rec printTable aTable = match aTable with 
        [],[],[] -&gt; ""
      | [],[],vH::vT -&gt; "\n"^(listToString vH)^printTable ([],[],vT)
      | [],cH::cT,v -&gt; "\t"^cH^"\t"^printTable([],cT, v) 
      | n, c , v-&gt; "\n"^(List.hd n)^"\n\n"^printTable([],c, v)
  
  
  
  
  end;;
  
  let atable =UsingTable.create_table (["Student"], ["Id";"Name";"Gender";"Course"], 
                                       [["001";"Jim";"M";"AlgoDS"];
                                        ["002";"Linnea";"F";"Databases"];
                                        ["003";"Anna";"F";"C#"];
                                        ["004";"Abby";"F";"C#"];
                                        ["005";"Arthur";"M";"JavaScript"]]);; 
  print_string (UsingTable.printTable atable) ;;
  </code></pre>