eyeling 1.6.4 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/eyeling.js +11 -9
- package/package.json +1 -1
package/eyeling.js
CHANGED
|
@@ -3024,10 +3024,8 @@ function evalBuiltin(goal, subst, facts, backRules, depth, varGen) {
|
|
|
3024
3024
|
s2[g.o.name] = lit;
|
|
3025
3025
|
return [s2];
|
|
3026
3026
|
}
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
}
|
|
3030
|
-
return [];
|
|
3027
|
+
const s2 = unifyTerm(g.o, lit, subst);
|
|
3028
|
+
return s2 !== null ? [s2] : [];
|
|
3031
3029
|
}
|
|
3032
3030
|
}
|
|
3033
3031
|
|
|
@@ -3078,9 +3076,8 @@ function evalBuiltin(goal, subst, facts, backRules, depth, varGen) {
|
|
|
3078
3076
|
s2[g.o.name] = durTerm;
|
|
3079
3077
|
return [s2];
|
|
3080
3078
|
}
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
}
|
|
3079
|
+
const s2 = unifyTerm(g.o, durTerm, subst);
|
|
3080
|
+
return s2 !== null ? [s2] : [];
|
|
3084
3081
|
}
|
|
3085
3082
|
return [];
|
|
3086
3083
|
}
|
|
@@ -3098,9 +3095,14 @@ function evalBuiltin(goal, subst, facts, backRules, depth, varGen) {
|
|
|
3098
3095
|
s2[g.o.name] = new Literal(formatNum(c));
|
|
3099
3096
|
return [s2];
|
|
3100
3097
|
}
|
|
3101
|
-
|
|
3102
|
-
|
|
3098
|
+
const lit = new Literal(formatNum(c));
|
|
3099
|
+
if (g.o instanceof Var) {
|
|
3100
|
+
const s2 = { ...subst };
|
|
3101
|
+
s2[g.o.name] = lit;
|
|
3102
|
+
return [s2];
|
|
3103
3103
|
}
|
|
3104
|
+
const s2 = unifyTerm(g.o, lit, subst);
|
|
3105
|
+
return s2 !== null ? [s2] : [];
|
|
3104
3106
|
}
|
|
3105
3107
|
return [];
|
|
3106
3108
|
}
|