3 ms·
> 3.) calling a function pushes everything onto the stack This is a very C-centric view of it. In FP, sometimes they're functions, sometimes they're closures.
by mrkeen 3y ago
> 3.) calling a function pushes everything onto the stack
This is a very C-centric view of it.
In FP, sometimes they're functions, sometimes they're closures. Sometimes they're fully applied and sometimes they're partially applied.
You're probably on the heap, not the stack for two reasons: tail recursion, and variables very often outliving the return.