UNPKG

458 BJavaScriptView Raw
1import { isTerm, isTermLike, Term } from "./term.js";
2export function isVariableLike(given, value) {
3 return isTermLike(given, "Variable", value);
4}
5export function isVariable(given, value) {
6 return isTerm(given, "Variable", value);
7}
8export class Variable extends Term {
9 constructor(value) {
10 super("Variable", value);
11 }
12 equals(other) {
13 return isVariableLike(other, this.value);
14 }
15}
16//# sourceMappingURL=variable.js.map
\No newline at end of file