[Haskell-beginners] explaining effects

Rein Henrichs rein.henrichs at gmail.com
Sat Dec 26 02:19:21 UTC 2015


There is no exact definition of "effect" so this discussion must
necessarily be vague and probably not very enlightening. The State Monad
may or may not have effects, depending on your definition, but it is
definitely pure.
On Wed, Dec 23, 2015 at 5:46 AM Imants Cekusins <imantc at gmail.com> wrote:

> > What is the exact defintion of "effect".
>
> let's try:
>
> effect:
> A change which is a consequence of an action (in this case, function call)
>
> side effect:
> change of environment state which is a consequence of an action (function
> call)
>
> pure function:
> calling this function does not affect environment state
> function returns a value, that's all
>
> I am not sure if function running inside e.g. state monad and
> modifying this monad's state is pure, i.e. if state monad is
> environment
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20151226/014b80dc/attachment.html>


More information about the Beginners mailing list