
18 May
2010
18 May
'10
5:30 a.m.
Andres Loeh wrote:
Nevertheless, people often refer to features such as state and exceptions as "effects", and hence sometimes call code that makes use of them "effectful" and code that does not "pure".
This makes sense if you think of monads as embedded domain specific languages. In the jargon of, say the DSL corresponding to the state monad, the operation put has an "effect". But the embedding into Haskell maps put to a pure function of type s -> ((),s) . Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com