title: OCaml expected to have type unit
body: <p>When trying to run the following function in <code>OCaml</code>:</p>
  
  <pre><code>let rec func1 o_list =
      match o_list with
      | [] -&gt; []
      | h::t -&gt; let (nt,inner_list) = h in
        if check_if_clear inner_list then
          [nt,inner_list]::clear_rules
        func1 t
  ;;
  </code></pre>
  
  <p>the program outputs an error</p>
  
  <blockquote>
    <p>Characters 139-141:
        [nt,inner_list]::clear_rules</p>
    
    <p>Error: This variant expression is expected to have type unit
    The constructor :: does not belong to type unit</p>
  </blockquote>
  
  <p>Also you can assume that the function <code>check_if_clear</code> always returns <code>true</code> for now.
  <code>o_list</code> is a list of pair and pair itself contains an element and a list.
  So it is something like this <code>[ 'x , ['a,'b,'c]]</code> and <code>clear_rules</code> is just an empty list at first.</p>