在OCaml,我们有两种equity comparisons:
OCaml
equity comparisons
x = y而且x == y,
x = y
x == y
那么它们之间的区别究竟是什么呢?
那x = y是ocaml就像x.equals(y)在Java中一样吗?
x.equals(y)
并且x == y就像x == y (comparing the address)在Java中?
x == y (comparing the address)
ocaml functional-programming
functional-programming ×1
ocaml ×1