State is modeled in Haskell as the type
newtype State s a = State (s -> (a, s))
Where s is the type of your state and a is the type of your result. It's basically a function that takes the current state and gives you a result as well as a new state.
Does Haskell have a forgettable concept ?
State could then be a forgettable infinite list rather than a side/effect.