[Haskell-beginners] explaining effects
Christopher Allen
cma at bitemyapp.com
Sat Dec 26 02:56:14 UTC 2015
Incidentally, IO is pure too
On Fri, Dec 25, 2015 at 8:19 PM, Rein Henrichs <rein.henrichs at gmail.com>
wrote:
> 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
>>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
>
--
Chris Allen
Currently working on http://haskellbook.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20151225/872b85fc/attachment-0001.html>
More information about the Beginners
mailing list