now it really works!

This commit is contained in:
Joeri Exelmans 2025-05-13 20:56:16 +02:00
parent c31ba88dfd
commit 174bab79e4
5 changed files with 55 additions and 34 deletions

View file

@ -42,9 +42,10 @@ export const nonEmptyEditorState: EditorState = {
resolved: undefined,
};
const functionWith3Params = trie.get(extendedEnv.name2dyn)("functionWith3Params");
const functionWith4Params = trie.get(extendedEnv.name2dyn)("functionWith4Params");
const fourtyThree = { i: 43n, t: Int };
const fourtyFour = { i: 44n, t: Int };
const fourtyFive = { i: 45n, t: Int };
export const tripleFunctionCallEditorState: EditorState = {
kind: "call",
@ -53,33 +54,43 @@ export const tripleFunctionCallEditorState: EditorState = {
fn: {
kind: "call",
fn: {
kind: "input",
text: "functionWith3Params",
resolved: functionWith3Params,
focus: false,
kind: "call",
fn: {
kind: "input",
text: "functionWith4Params",
resolved: functionWith4Params,
focus: false,
},
input: {
kind: "input",
text: "42",
resolved: fourtyTwo,
focus: false,
},
resolved: apply(fourtyTwo)(functionWith4Params),
},
input: {
kind: "input",
text: "42",
resolved: fourtyTwo,
text: "43",
resolved: fourtyThree,
focus: false,
},
resolved: apply(fourtyTwo)(functionWith3Params),
resolved: apply(fourtyThree)(apply(fourtyTwo)(functionWith4Params)),
},
input: {
kind: "input",
text: "43",
resolved: fourtyThree,
text: "44",
resolved: fourtyFour,
focus: false,
},
resolved: apply(fourtyThree)(apply(fourtyTwo)(functionWith3Params)),
resolved: apply(fourtyFour)(apply(fourtyThree)(apply(fourtyTwo)(functionWith4Params))),
},
input: {
kind: "input",
text: "44",
resolved: fourtyFour,
text: "45",
resolved: fourtyFive,
focus: false,
},
resolved: apply(fourtyFour)(apply(fourtyThree)(apply(fourtyTwo)(functionWith3Params))),
resolved: apply(fourtyFive)(apply(fourtyFour)(apply(fourtyThree)(apply(fourtyTwo)(functionWith4Params)))),
};