title: OCaml Types not compatible - OCamlyacc
body: <pre><code>  funcexpr:  /* This is a function: arguments -&gt; string list */
     LPAREN HEAD arguments RPAREN                     { let head a = [List.hd (List.hd a)] in head &lt;&lt; $3 }
   | LPAREN REAR arguments RPAREN                     { let rear b = List.tl (List.hd b) in rear &lt;&lt; $3 }
   | LPAREN ERECT arguments RPAREN                    { let erect c = List.append (List.hd c) (List.hd (List.tl c)) in erect &lt;&lt; $3 }
     ;
   arguments:  /* This is a list of functions */
     PARAM                                            { let func p = p in func }
   | funcexpr                                         { [$1] }
   | arguments arguments                              { List.append $1 $2 }
  </code></pre>
  
  <p>Returns an error: Error: This expression has type string list -> string list but an expression was expected of type string list -> string list list Type string is not compatible with type string list</p>
  
  <p>I think that we need to somehow put func into a list, but every way I've tried doesn't seem to work! Any help appreciated..</p>