I am a beginner with OCaml. I would like to skip the first element of my list.
Here is my list:
let l = [1;2;3;4;5;6;7;2;1];;
I want to use this in my FOR:
let l = List.tl l;
here is my full 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 ldone;;
But I have errors in the DONE and it says syntax error.