title: Ocaml Variant Types
body: <p>OCaml types have always really confused me no matter what tutorials/manuals I read. I need to define a type, let's say test, that does contains the following forms:</p>
  
  <p>a type ('a, 'b) test that has one of the forms:
      Empty, T t, N n, Seq [x1...xn]</p>
  
  <p>I know how to do the first 3, but I have absolutely no idea how to define the last form. This is what I have:</p>
  
  <pre><code>type ('nonterm, 'term) test =
     | Empty
     | T of 'term
     | N of 'nonterm
     | ????
  </code></pre>
  
  <p>For seq, I need to match the instances of subexpressions x1 to xn. If x = 0, then this is empty. Can anybody please help me? Thanks in advance.</p>