// Generated by ReScript, PLEASE EDIT WITH CARE import * as Mocha from "mocha"; import * as Test_utils from "./test_utils.mjs"; import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.mjs"; let called = { contents: 0 }; function g() { let v = {}; let next = (i, b) => { called.contents = called.contents + 1 | 0; if (b) { v.contents(i, false); } return i + 1 | 0; }; Primitive_object.updateDummy(v, { contents: next }); console.log(next(0, true).toString()); } g(); let x = {}; let y = {}; Primitive_object.updateDummy(x, {hd: 1, tl: y}); Primitive_object.updateDummy(y, {hd: 2, tl: x}); Mocha.describe("Rec_fun_test", () => { Mocha.test("called contents", () => Test_utils.eq("File \"rec_fun_test.res\", line 26, characters 35-42", 2, called.contents)); }); export { called, g, x, y, } /* Not a pure module */