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

* Re: [Caml-list] why is the variable here unbound.
  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>
  1 sibling, 0 replies; 3+ messages in thread
From: Malcolm Matalka @ 2014-11-05 18:54 UTC (permalink / raw)
  To: Roelof Wobben; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 767 bytes --]

I think you mean ... in length2 list []
Den 5 nov 2014 19:47 skrev "Roelof Wobben" <r.wobben@home.nl>:

> 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
>
>
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

[-- Attachment #2: Type: text/html, Size: 1351 bytes --]

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

* Re: [Caml-list] why is the variable here unbound.
       [not found]     ` <CADwd1fMpMU-0srRKqA2q5K=YaKq3HHaFPN-CTMnmJnsyu3f-8Q@mail.gmail.com>
@ 2014-11-05 19:14       ` Roelof Wobben
  0 siblings, 0 replies; 3+ messages in thread
From: Roelof Wobben @ 2014-11-05 19:14 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/html, Size: 5646 bytes --]

^ 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).