3 ms·
The so maligned "state" in FP resides in the call stack: f(g(h(x))) It's a mutable and invisible data structure that drives the execution of the program.
by bluetomcat 4y ago
The so maligned "state" in FP resides in the call stack:
f(g(h(x)))
It's a mutable and invisible data structure that drives the execution of the program.
- naasking 4y agoIt's not mutable and it's not a stack in the model, that's just an implementation artifact used for efficiency. You could equally well allocate every function context on the heap.