title: OCaml Core List.Assoc.find
body: <p>I am having trouble running some code from the book Real World OCaml. The code snippet is on <a href="https://github.com/realworldocaml/examples/blob/master/code/files-modules-and-programs-freq/freq.ml" rel="nofollow noreferrer">github</a>. In particular, I am getting a type error on line 6:</p>
  
  <p><code>List.Assoc.find counts line</code></p>
  
  <p>I am using OCaml 4.04.1 and according to utop, the type signature of <code>List.Assoc.find</code> is:</p>
  
  <p><code>('a, 'b) List.Assoc.t -&gt; equal:('a -&gt; 'a -&gt; bool) -&gt; 'a -&gt; 'b option =
  &lt;fun</code></p>
  
  <p>Notice the non-optional parameter <code>equal</code> that is missing from the code snippet above. But, according to the latest (as of June 2017) <a href="https://ocaml.janestreet.com/ocaml-core/113.33/doc/core_kernel/Core_kernel/Core_list.mod/Assoc.mod/" rel="nofollow noreferrer">documentation</a> for <code>List.Assoc.find</code>, the <code>equal</code> parameter is optional.</p>
  
  <p>What is the purpose of the <code>equal</code> parameter?</p>