We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9033667 commit c49baacCopy full SHA for c49baac
2 files changed
tests/known-bugs/solution.txt
@@ -0,0 +1 @@
1
+foo = \ x j c . x c ()
tests/known-bugs/test.js
@@ -0,0 +1,18 @@
+import {readFileSync} from "fs";
2
+import {assert, config as chaiConfig} from "chai";
3
+chaiConfig.truncateThreshold = 0;
4
+
5
+import * as LC from "../../src/lambda-calculus.js";
6
+LC.configure({ purity: "Let", numEncoding: "None" });
7
8
+const solutionText = readFileSync(new URL("./solution.txt", import.meta.url), {encoding: "utf8"});
9
+const { foo } = LC.compile(solutionText);
10
11
+describe("No side effects", () => {
12
+ it("The initial failed call used to cause the second call to behave weirdly", () => {
13
+ try {
14
+ foo("hi")("there")("world")
15
+ } catch {}
16
+ assert.strictEqual( foo(null).term.toString(), "\\ j c . x c ()" );
17
+ });
18
+});
0 commit comments