This is the answer to your comment on Michael E:
OCaml variants consist of constructors with optional arguments. In the case of Michael's answer, the constructors are: Empty , T , N and Seq . Empty takes no arguments, T accepts a generic type called 'term , and N accepts a generic type called 'nonterm (in a second I will get Seq ). The variant is of type ('nonterm, 'term) test . Let's say you need a list of elements of type ('nonterm, 'term) test :
# [Empty; Empty];; - : ('a, 'b) test list = [Empty; Empty]
You will notice that type ('a, 'b) test list . (OCaml replaced nonterm with a and term with b , but you don't need to worry too much about it.)
Now we can see that | Seq of ('nonterm, 'term) test list | Seq of ('nonterm, 'term) test list is a constructor called Seq that takes as argument a list of elements of type ('nonterm, 'term) test . Now we can do it:
# Seq [Empty;Empty];; - : ('a, 'b) test = Seq [Empty; Empty]
source share