title: OCaml : How to create a list of n 1's in
body: <p>What is the equivalent of the following Python code in OCaml?</p>
  
  <p><code>lst = [0] * N</code></p>
  
  <p>It seems to me that OCaml has not overloaded the <code>*</code> for Lists.</p>
  
  <p>I have written the following function</p>
  
  <pre><code>let makeList i = if i = 0 then [] else 0 :: makeList (i-1)
  </code></pre>
  
  <p>Can I do something using a <code>for</code> loop or make the code shorter?</p>