1

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?

10
  • 7
    "Higher order function" Commented Sep 10, 2018 at 3:54
  • 1
    A higher order function is a function that takes a function as an argument, or returns a function Commented Sep 10, 2018 at 3:55
  • 1
    I call them funky funcs. Commented Sep 10, 2018 at 6:41
  • I think Fabio is right, but he forgot to add the Wikipedia link where he cited from. Commented Sep 10, 2018 at 6:45
  • 1
    I think RibaldEddie is probably right, but the more common term is "Higher order function", as Fabio stated. Commented Sep 10, 2018 at 12:15

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.