Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: