News for hackers. Stuff that matters.
Re:Functional Programming in 5 Minutes by minikomi on Sunday May 19, 2013 @06:35PM (#5734691)
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

There are no comments on this comment yet.