title: Calling multiple functions within another function Ocaml
body: <p>I would like to know if there is anyway I can call the same function but with different arguments within another function. This is my code for the function I would like to call.</p>
  
  <pre><code>let concattoset s set = SS.add s set
  </code></pre>
  
  <p>With this function, I have another function that calls this function but is it possible to do something like this:</p>
  
  <pre><code>let op_change p set = concattoset (Format.asprintf "%a" processoperatorchange p) set ;concattoset (Format.asprintf "%a" processoperatorchange2 p) set ; concattoset (Format.asprintf "%a" processoperatorchange3 p) set
  </code></pre>
  
  <p>I know that whenever I do this, the last term is added and any other term before that is ignored. Is it possible to find out the best approach for this or if possible an alternative way of doing this?</p>
  
  <p>In a similar situation within a match pattern is it possible to use the same operator. So for instance this is my match function:</p>
  
  <pre><code>let rec processoperatorchange4 fmt = function
  | Zero -&gt; Format.fprintf fmt "0"
  | Pproc x -&gt; Format.fprintf fmt "%s" x
  | Procdef (p1, x) -&gt; Format.fprintf fmt "%a(%s)"  processoperatorchange4 p1  x 
  **| Par (p1, p2) -&gt; Format.fprintf fmt "(%a | %a)" processoperatorchange4 p1 processoperatorchange4 p2 |&gt; Format.fprintf fmt "(%a + %a)"**
  </code></pre>