add interactive prompt
This commit is contained in:
parent
ce192b49f2
commit
94efde3e65
22 changed files with 599 additions and 138 deletions
|
|
@ -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;
|
||||
// }
|
||||
// }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue