Commit 3b2fbf2b authored by László Domoszlai's avatar László Domoszlai

kill unnecessary recursion

git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/trunk@2392 63da3aa8-80fd-4f01-9db8-e6ea747a3da2
parent 591c8ff9
......@@ -223,10 +223,11 @@ Sapl = new function () {
}
if (arraycons) {
var f = this.toJS(this.feval(args[0]));
res.push(f);
var s = this.toJS(this.feval(args[1]));
for (var i = 0; i < s.length; i++) res.push(s[i]);
while(this.isCons(expr[1])){
var f = this.toJS(this.feval(expr[2]));
res.push(f);
expr = this.feval(expr[3]);
}
} else {
for (var i = 0; i < args.length; i++) {
var aarg = this.toJS(this.feval(args[i]));
......
......@@ -223,10 +223,11 @@ Sapl = new function () {
}
if (arraycons) {
var f = this.toJS(this.feval(args[0]));
res.push(f);
var s = this.toJS(this.feval(args[1]));
for (var i = 0; i < s.length; i++) res.push(s[i]);
while(this.isCons(expr[1])){
var f = this.toJS(this.feval(expr[2]));
res.push(f);
expr = this.feval(expr[3]);
}
} else {
for (var i = 0; i < args.length; i++) {
var aarg = this.toJS(this.feval(args[i]));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment