3 ms·
> Returning a function is nothing else as returning a pointer to a memory location. That depends. If the language supports proper first-class functions, it's b
by zozbot234 5y ago
> Returning a function is nothing else as returning a pointer to a memory location.
That depends. If the language supports proper first-class functions, it's basically an instruction pointer plus a record of the variable bindings the function code is "closed over" (i.e. parameterized on). Many languages do support this nowadays.