# Formal names of nested functions

I have a nested function as follow:

def make_adder(n):
return x + n
>>> plus_3(4) 7
>>> plus_5(4) 9


What's the formal names of make_adder and add?
Can I call them 'outer function' and 'inner function'?

• I can't think of a completely standard term, but I believe your terms (outer/inner) are sometimes used. I think I also heard top-level/nested function, and global/local function. None of these term properly "scale" to multiple nestings, though. – chi Nov 29 '17 at 17:39

A function that either takes a function as argument or returns a function as result is called a High Order Function in functional programming. Your function make_adder is doing the latter.