Wrap you lazy function body inside a self calling function and return.
function add (a, b) { return a + b; } var make_lazy = function (add, a, b) { return (function () { add(a,b); })(); } Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about CollectivesStack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Explore Stack InternalWrap you lazy function body inside a self calling function and return.
function add (a, b) { return a + b; } var make_lazy = function (add, a, b) { return (function () { add(a,b); })(); } Wrap you lazy function body inside a self calling function and return.
function add (a, b) { return a + b; } var make_lazy = function (a, b) { return (function () { add(a,b); })(); } Wrap you lazy function body inside a self calling function and return.
function add (a, b) { return a + b; } var make_lazy = function (add, a, b) { return (function () { add(a,b); })(); }