3 ms·
I think you might be confusing state and values. Pure functional programming has plenty of values. If you need a new value, you just return the new value, inste
by kazagistar 10y ago
I think you might be confusing state and values. Pure functional programming has plenty of values. If you need a new value, you just return the new value, instead of reaching into an existing data structure and messing with it.
If a function closes over immutable values, then the resulting closure is an immutable value. If a function closes over mutable state, then its mutable state, often even uglier then mutable objects or structs which actually make the exact contents easier to identify at least.