Objectmix
Tags Register Mark Forums Read

difference between let rec and let? : ml

This is a discussion on difference between let rec and let? within the ml forums in Programming Languages category; what is the difference between "let rec" and just "let"? what does rec stand for? are the following defintions exactly the same? at least they seem to give the same results... # let rec cube x = x*x*x;; val cube : int -> int = <fun> # cube 12;; - : int = 1728 # let cubex x = x*x*x;; val cubex : int -> int = <fun> # cubex 12;; - : int = 1728 #...


Object Mix > Programming Languages > ml > difference between let rec and let?

Reply

 

LinkBack Thread Tools
  #1  
Old 08-12-2008, 01:22 PM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default difference between let rec and let?

what is the difference between "let rec" and just "let"? what does rec
stand for?

are the following defintions exactly the same? at least they seem to
give the same results...

# let rec cube x = x*x*x;;
val cube : int -> int = <fun>
# cube 12;;
- : int = 1728

# let cubex x = x*x*x;;
val cubex : int -> int = <fun>
# cubex 12;;
- : int = 1728
#


Reply

Thread Tools



All times are GMT -5. The time now is 01:01 AM.

Managed by Infnx Pvt Ltd.