progress with versioning lib
This commit is contained in:
parent
3623988f86
commit
618cdf7314
7 changed files with 236 additions and 91 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { inspect } from "node:util";
|
||||
import { assignFn } from "../generics/unify.js";
|
||||
// import { assignFn } from "../generics/generics.js";
|
||||
|
||||
function inspectDynamic(_depth, options, inspect) {
|
||||
|
|
@ -13,14 +14,14 @@ export const newDynamic = i => t => ({
|
|||
export const getInst = lnk => lnk.i;
|
||||
export const getType = lnk => lnk.t;
|
||||
|
||||
// export const apply = input => fun => {
|
||||
// const inputType = getType(input)
|
||||
// const funType = getType(fun);
|
||||
// const outputType = assignFn(funType, inputType);
|
||||
export const apply = fun => input => {
|
||||
const inputType = getType(input)
|
||||
const funType = getType(fun);
|
||||
const outputType = assignFn(funType, inputType);
|
||||
|
||||
// const inputValue = getInst(input);
|
||||
// const funValue = getInst(fun);
|
||||
// const outputValue = funValue(inputValue);
|
||||
const inputValue = getInst(input);
|
||||
const funValue = getInst(fun);
|
||||
const outputValue = funValue(inputValue);
|
||||
|
||||
// return newDynamic(outputValue)(outputType);
|
||||
// };
|
||||
return newDynamic(outputValue)(outputType);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue