Browse files

removed some cruft

  • Loading branch information...
1 parent 98eeaeb commit d9897b6c21c5aee367833ca2a644037832dfdf4c david karapetyan committed May 8, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −5 scheem/scheem.js
View
9 scheem/scheem.js
@@ -153,11 +153,10 @@ var evalScheem = function(expr, env) {
evalScheem(expr[2], env) : evalScheem(expr[3], env);
default: // not a special form so must be a function application form
var func_and_args = expr.map(function(x) {return evalScheem(x, env);});
- var func = func_and_args[0];
- var i = 1;
- var result = func.call(null, func_and_args[i]);
- while (typeof result === 'function' && ++i < func_and_args.length) {
- result = result.call(null, func_and_args[i]);
+ var func = func_and_args[0], result = func(func_and_args[1]);
+ var i = 1, len = func_and_args.length;
+ while (typeof result === 'function' && ++i < len) {
+ result = result(func_and_args[i]);
}
return result;
}

0 comments on commit d9897b6

Please sign in to comment.