ML assignment operation

2019-06-09 10:36发布

问题:

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.



标签: sml smlnj ml