title: OCaml Abstract typed functions
body: <p>I want to accomplish something like this, but I can't quite get the syntax down.</p>
  
  <pre><code>type _ s = Var : 'a -&gt; 'a s
  type _ t = 
  | AA :('a -&gt; 'a s) -&gt; 'c t
  | AB : ('a -&gt; 'b s) -&gt; 'c t
  let apply_to x = function
  | AA g -&gt; g x
  | AB g -&gt; g x
  </code></pre>