与python中的模运算符相比,OCaml中 的模函数mod返回结果不同.
mod
OCaml的:
# -1 mod 4 - : int = -1
蟒蛇:
>>> -1 % 4 3
为什么结果不同?
是否有任何标准模块功能,如%OCaml中那样运行?
%
python ocaml operators modulo
modulo ×1
ocaml ×1
operators ×1
python ×1