why is acc here unbound

"Roelof Wobben [email protected] [ocaml_beginners]" <[email protected]>
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <[email protected]>
Hello,

I have this :

let length list =
     let rec length2 list2 acc =
         match list2 with
            | [] -> acc
            | x::xs -> length2 xs (acc + 1)
     in acc 0 list2 list ;;

But as soon as I copie it into the ocaml prompt I see a message that the 
acc in the part in acc 0 list2 list is unbound.

Roelof
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.