4 ms·
I agree with this. The article also contains this excerpt: Even though there are significant benefits to programming with immutability, programming without st
by DanWaterworth 14y ago
I agree with this.
The article also contains this excerpt:
Even though there are significant benefits to programming with immutability, programming without state is also tricky and usually requires workarounds in FP.
'Workarounds' links to a page that describe Haskell's state monad, but Haskell's state monad only uses immutable state. It's just a wrapper around an ordinary function with the type: (s -> (o, s)) . As far as workarounds go, this is not a good example.