Re: what did I do wrong here ?

"John Whitington [email protected] [ocaml_beginners]" <[email protected]>
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <[email protected]>
Hi,

Roelof Wobben [email protected] [ocaml_beginners] wrote:
> it helps but still im a little bit confused.
>
> What I try to do it this :
>
> lets say I want to calculate this 1+2+3
> then first 2+3 must be calculated and the outcome will be 5
> then 5+1 must be calculated so the outcome will be 6.
>
> Now there are no arguments anymore so the outcome must be displayed.
>
> But if there are no arguments so sum  then the answer must be 0
>
> and I use this as a example and here a=  is used  : # let rec factorial
> a = if a = 1 then 1 else a * factorial (a - 1);;

You might find these (very basic) videos help you to understand 
expressions. In particular videos 1 - 4:

http://ocaml-book.com/videos/

Thanks,

-- 
John Whitington
Director, Coherent Graphics Ltd
http://www.coherentpdf.com/
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.