title: Ocaml continuation passing style
body: <p>I'm new to ocaml and tryin to write a continuation passing style function but quite confused what value i need to pass into additional argument on k</p>
  
  <p>for example, I can write a recursive function that returns true if all elements of the list is even, otherwise false. </p>
  
  <p>so its like </p>
  
  <pre><code>let rec even list = .... 
  </code></pre>
  
  <p>on CPS, i know i need to add one argument to pass function 
  so like </p>
  
  <pre><code>let rec evenk list k = .... 
  </code></pre>
  
  <p>but I have no clue how to deal with this k and how does this exactly work </p>
  
  <p>for example for this even function, environment looks like </p>
  
  <pre><code>val evenk : int list -&gt; (bool -&gt; ’a) -&gt; ’a = &lt;fun&gt;
  
  evenk [4; 2; 12; 5; 6] (fun x -&gt; x)  (* output should give false *)
  </code></pre>