|
|
value
'', ``let
'' being reserved to the
construction ``let..in
'':
OCaml | Revised |
---|---|
let x = 23;; | value x = 23; |
let x = 23 in x + 7;; | let x = 23 in x + 7; |
value
'', too, instead of
``val
''.
OCaml | Revised |
---|---|
val x : int;; | value x : int; |
|
do
'' followed by ``{
'' and terminated by ``}
''
(it is possible to put a semicolon after the last expression):
OCaml | Revised |
---|---|
e1; e2; e3; e4 | do { e1; e2; e3; e4 } |
for
'' and ``while
'' has the same
syntax:
OCaml | Revised |
---|---|
while e1 do | while e1 do { |
e2; e3; e4 | e2; e3; e4 |
done | } |
|