3.5. Let expression
There is a short form for match expressions.
An expression of the form:
let letpat = expr1 in expr2
is equivalent to
match expr1 with letpat => expr2 endmatch
The let expression is, in effect, a prefix operator with
the lowest precedence.
Start felix section to tut/tutorial/tut-2.05-0.flx[1
/1
]
1: #line 5248 "./lpsrc/flx_tutorial.pak"
2:
3:
4: print (match 1 with | ?x => x + x endmatch); endl;
5: print (let ?z = 1 in z + z); endl;
6: print (let ?x = (let ?y = 2 in y + y) in x + x); endl;
Start data section to tut/tutorial/tut-2.05-0.expect[1
/1
]