Skip to content

Commit

Permalink
Merge pull request #802 from null-a/tweak-param-init
Browse files Browse the repository at this point in the history
Simplify function call
  • Loading branch information
stuhlmueller committed Mar 30, 2017
2 parents 7023e0f + 38ecb5e commit 6120c5d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/params/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ module.exports = function(env) {
throw new Error('Expected the init argument to be a function.');
}

var appliedInit = function(s, k, a) {
return init.apply(global, [s, k, a, dims]);
var initThunk = function(s, k, a) {
return init(s, k, a, dims);
};

var next = function(k, ret) {
Expand All @@ -96,7 +96,7 @@ module.exports = function(env) {
return finish(s);
};

return runForward(s, next, a, appliedInit);
return runForward(s, next, a, initThunk);
}

function finish(s) {
Expand Down

0 comments on commit 6120c5d

Please sign in to comment.