add interactive prompt

This commit is contained in:
Joeri Exelmans 2025-03-20 09:54:11 +01:00
parent ce192b49f2
commit 94efde3e65
22 changed files with 599 additions and 138 deletions

View file

@ -62,3 +62,19 @@ export const sumType = (leftType, rightType) => {
return st;
}
}
// const genericTypes = new Map();
// export const genericType = (underlyingType) => {
// if (genericTypes.has(underlyingType)) {
// // only generate each list type once
// // this would not be necessary if we could define our own equality and hash functions on objects in JavaScript.
// return genericTypes.get(underlyingType);
// }
// else {
// const type = {
// generic: underlyingType,
// };
// genericTypes.set(underlyingType, type);
// return type;
// }
// }