From: "Dário Abdulrehman" <drehman31@gmail.com>
To: "Lucas Holland" <hollandlucas@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Simple factorial
Date: Tue, 23 Jan 2007 19:11:52 +0000 [thread overview]
Message-ID: <6aeedf580701231111r32503ee5te3a01e6100a1b1aa@mail.gmail.com> (raw)
In-Reply-To: <3E3A2218-5AA0-445F-A37D-B12EF4A2F9CB@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 933 bytes --]
Hi,
Join http://tech.groups.yahoo.com/group/ocaml_beginners/ .
The yahoo list is more appropriate for beginner questions (I am a beginner
too).
Anyway, whatever the programming language you are using, you need to define
a base case for recursion...
On 1/23/07, Lucas Holland <hollandlucas@gmail.com> wrote:
>
> Hello,
>
> I've just started learning O'Caml. I've written a simple factorial
> function (no checking whether n is 1 etc.):
>
> let rec factorial n =
> n * factorial (n-1);;
>
> When I call this function with let's say 5 as an argument, I get an
> overflow error message.
>
> Any ideas?
>
> chell
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> 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: 1602 bytes --]
next prev parent reply other threads:[~2007-01-24 17:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-23 18:50 Lucas Holland
2007-01-23 19:04 ` [Caml-list] " Tom
2007-01-23 19:10 ` robert
2007-01-23 19:11 ` Dário Abdulrehman [this message]
2007-01-23 19:50 ` Till Varoquaux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6aeedf580701231111r32503ee5te3a01e6100a1b1aa@mail.gmail.com \
--to=drehman31@gmail.com \
--cc=caml-list@yquem.inria.fr \
--cc=hollandlucas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox