Dmitri O.Kondratiev wrote:
Jules,
Stupid question, please bear with me:
x :: Int -- x declared, but not constructed
x = 1 -- x constructed
s1 :: State StdGen a -- s1 declared, yes, but why s1 is *also already
constructed* ?
it's not.
it's constructed when you do
s1 = return 1
... or ...
s1 = get >>= put
.. or some other more complex interaction, perhaps using do notation.
It's the >>= or the return that construct the State, just as the '1' is
enough to construct the Int.
Jules
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe