Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

O'Caml

Name: Anonymous 2011-07-31 14:16

Good day, fellow /prog/raiders.
I am currently learning O'Caml, what should I pay attention? What is Bad and what is Good on this language?

Name: Anonymous 2011-08-01 22:12

>>23
So you can do stuff like

let rec fact n = if n=0 then 1 else
 let n = n*(n-1) in fact n   (* <<-- For haskell, let n = n*(n-1) would not make sense. *)


Basically, you don't force recursive definitions every time you use let. Also, you don't have to make up new variable names all the time.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List