title: OCaml initializing list in loop for
body: <p>I am a beginner with OCaml. I would like to skip the first element of my list.</p>
  
  <p>Here is my list:</p>
  
  <pre><code>let l = [1;2;3;4;5;6;7;2;1];;
  </code></pre>
  
  <p>I want to use this in my FOR:</p>
  
  <pre><code>let l = List.tl l;
  </code></pre>
  
  <p>here is my full code:</p>
  
  <pre><code>let l = [1;2;3;4;5;6;7;2;1];;
  let n = 1;;
  let counter = ref 0;;
  for i = 0 to (List.length l) do
  if List.hd l = n then counter := !counter + 1;
  print_int(!counter);
  print_string("\n");
  let l = List.tl l
  done;;
  </code></pre>
  
  <p>But I have errors in the DONE and it says syntax error.</p>
  
  <p>Can anyone help me please?</p>