progress with versioning

This commit is contained in:
Joeri Exelmans 2025-06-08 13:14:29 +02:00
parent e106ced1ec
commit d30f1312b6
2 changed files with 15 additions and 19 deletions

View file

@ -20,8 +20,8 @@ const [
[, {i: matchValue}],
] = makeModuleEnum(Value)([
{l: "literal" , r: Dynamic},
{l: "read" , r: Write}, // a 'read' reads the result of a Write
{l: "transform", r: Transformation},
{l: "read" , r: Write}, // <- a 'read' reads the result of a Write (to a Slot)
{l: "transform", r: Transformation}, // <- result of a function call
]);
// Enum: Slot
@ -36,7 +36,7 @@ const [
{l: "write", r: Write},
]);
// Struct: Transformation
// Struct: Transformation (i.e., a function call)
const [
// constructor
[, {i: newTransformation}],
@ -45,9 +45,9 @@ const [
// [, {i: getFn}],
// [, {i: getOutput}],
] = makeModuleStruct(Transformation)([
{l: "input" , r: Value },
{l: "fn" , r: Value },
{l: "output", r: Dynamic},
{l: "input" , r: Value }, // <- the input is a value (e.g., could be the result of a Transformation itself)
{l: "fn" , r: Value }, // <- the function is also a value (e.g., could also be result of a transformation, e.g., when currying)
{l: "output", r: Dynamic}, // <- the result
]);
// Struct: Write