difference between let rec and let?

89 views
Skip to first unread message

ssecorp

unread,
Aug 12, 2008, 2:22:06 PM8/12/08
to comp-l...@moderators.isc.org
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 all
Reply to author
Forward
0 new messages