DEV Community

Discussion on: What is a Higher-Order Function?

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

"Returning a function"

If you want to be very technical, what's returned in the example is not just a function, but a closure. Sometimes it's a very useful distinction, sort of like objects vs. classes, where a closure can be thought of as an instance of a subroutine.