> So as I understand it,languages like Haskell(which I dont know) wrap states into a type that can be passed to pure functions right?
I would restate this as: "In Haskell you write a description of a stateful computation." The "State Monad" is really just the illusion of mutable state, provided by passing the underlying state to each described computation. Actually-mutable state is possible with things like IORef, but these are impure.