问题
everyone, what is difference between the following assignments in ML,
val n = 5;
and
n := 1;
回答1:
The former is a declaration of a new, immutable variable. The latter is how you re-assign the value of a reference cell.
来源:https://stackoverflow.com/questions/5168889/ml-assignment-operation