Let's say I have the following function (in JavaScript, for sake of example):
function foo() { var bar = function () {return 'lol';} return bar; } This function returns other functions. I had the misconception that this was called a generator, but on reading around, that's something different entirely. Googling this question didn't give me anything useful.
So, what do I call a function that creates functions?