difference between let rec and let?

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 #...

Go Back   Application Development Forum > Programming Languages > ml

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-12-2008, 02:22 PM
ssecorp
Guest
 
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 With Quote
Reply


Thread Tools
Display Modes


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


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.