Hacker News new | ask | show | jobs
by minikomi 4784 days ago
Just to help in case it isn't obvious - g also returns a function - which could be assigned to a variable. In this case it's called straight away but you could do it like

    var powerOfFour = g(function(x) {return x*x;});
    powerOfFour(3) === 81; //true