caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] why is the variable here unbound.
@ 2014-11-05 18:46 Roelof Wobben
  2014-11-05 18:54 ` Malcolm Matalka
       [not found] ` <CADwd1fMObvvRBbptSmfKq+PaNLqeDUtmjmnPipQ1y7aVDFmduQ@mail.gmail.com>
  0 siblings, 2 replies; 3+ messages in thread
From: Roelof Wobben @ 2014-11-05 18:46 UTC (permalink / raw)
  To: caml-list

Hello,

I asked this question also on the beginners list but till now no respons.

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-05 19:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-05 18:46 [Caml-list] why is the variable here unbound Roelof Wobben
2014-11-05 18:54 ` Malcolm Matalka
     [not found] ` <CADwd1fMObvvRBbptSmfKq+PaNLqeDUtmjmnPipQ1y7aVDFmduQ@mail.gmail.com>
     [not found]   ` <545A72F7.8020109@home.nl>
     [not found]     ` <CADwd1fMpMU-0srRKqA2q5K=YaKq3HHaFPN-CTMnmJnsyu3f-8Q@mail.gmail.com>
2014-11-05 19:14       ` Roelof Wobben

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).