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

Function that returns a function.

You pass your counter into the function, it returns a function that remembers the original value, not the value as it keeps iterating later on in the caller.



That's just a higher order function?

That's an interesting definition. I thought you would either go with https://en.wikipedia.org/wiki/Functor_(functional_programmin... or with https://en.wikipedia.org/wiki/Function_object

https://en.wikipedia.org/wiki/Functor_(disambiguation) has a few more choices, but doesn't seem to have yours.


Functor must be one of the worst overloaded terms in all of computing.




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

Search: