| Language construct | Lightweight syntax | Verbose syntax |
|---|---|---|
| compound expressions |
; |
|
|
nested let bindings | ``` let f x = let a = 1 let b = 2 x + a + b ``` |
let f x =
let a = 1 in
let b = 2 in
x + a + b |
| code block |
|
|
| **for...do** |
|
|
| **while...do** |
|
|
| **for...in** |
|
|
| **do** |
|
|
| record |
|
|
| class | ``` type () = ... ``` |
|
| structure |
|
|
| discriminated union |
|
|
| interface |
|
|
| object expression |
|
|
| interface implementation |
|
|
| type extension |
|
|
| module |
|
|
Test