Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Simple factorial
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Lucas Holland <hollandlucas@g...>
Subject: Simple factorial

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?