title: Limitations of let rec in OCaml
body: <p>I'm studying OCaml these days and came across this:</p>
  
  <p>OCaml has limits on what it can put on the righthand side of a let rec. Like this one</p>
  
  <pre><code>let memo_rec f_norec =
  let rec f = memoize (fun x -&gt; f_norec f x) in
  f;; 
  Error: This kind of expression is not allowed as right-hand side of `let rec'
  </code></pre>
  
  <p>in which, the memoize is a function that take a function and turns it into a memorized version with Hashtable. It's apparent that OCaml has some restriction on the use of constructs at the right-hand side of 'let rec', but I don't really get it, could anyone explain a bit more on this?</p>