time-to-botec/squiggle/node_modules/@rescript/std/lib/js/caml_int32.js
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

27 lines
390 B
JavaScript

'use strict';
function div(x, y) {
if (y === 0) {
throw {
RE_EXN_ID: "Division_by_zero",
Error: new Error()
};
}
return x / y | 0;
}
function mod_(x, y) {
if (y === 0) {
throw {
RE_EXN_ID: "Division_by_zero",
Error: new Error()
};
}
return x % y;
}
exports.div = div;
exports.mod_ = mod_;
/* No side effect */