[Haskell] ST vs State

Federico Squartini federico.squartini at googlemail.com
Wed May 30 05:59:55 EDT 2007


But they are very similar! At least superficially.

They are both based on the notion of state transformer. Moreover in
the original paper about the ST monad:
http://www.dcs.gla.ac.uk/fp/papers/lazy-functional-state-threads.ps.Z

The authors say:

"In this paper we describe a way to express stateful algorithms in
non-strict, purely functional languages".  And almost everywhere in
the paper looks as if they are talking about a normal State monad.

I suppose there is something "under the hood" which makes them
different, but I cannot figure out what.

Federico


> Very very different.
>
> -- Don
>


More information about the Haskell mailing list