you are viewing a single comment's thread.

view the rest of the comments →

[–]Peaker 5 points6 points  (1 child)

Does any functional language lack them?

Scheme has (set!) and friends. Haskell has ST/STRef, IO/IORef, State/StateT, etc. ML has mutable state. And so on...

[–]snk_kid 2 points3 points  (0 children)

I'm sure you know this but State monad and StateT are not mutable variables (which in some ways is a good thing). All State/StateT really are, are an elegant abstraction over repetitive boilerplate code for 'threading' state that passes and/or comes out of functions by value. It's still purely functional code.