foo(..., function (n) { // closure over q, r, s });
function bar(q, r, s) { return function(n) { // still has dependency on q, r, s } }
foo(..., bar(q, r, s));
The main loop of
https://github.com/ithinkihaveacat/node-fishback/blob/ce5f9c...
does quite a lot of this, if you want a real example.
function bar(n) { // still has dependency on q, r, s } foo(..., bar);
The main loop of
https://github.com/ithinkihaveacat/node-fishback/blob/ce5f9c...
does quite a lot of this, if you want a real example.