Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. How to show a predicate (martin)
2. Re: explaining effects (martin)
3. Re: explaining effects (Imants Cekusins)
----------------------------------------------------------------------
Message: 1
Date: Wed, 23 Dec 2015 13:55:26 +0100
From: martin <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: [Haskell-beginners] How to show a predicate
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Hello all,
in my program, I do stuff with predicates (a->Bool). For the most part this
representation is just fine, but at the very
end I need to convert a resulting predicate into a String so I can write it to
a file.
Wenn I represent my predicates as Lists or Sets, then this is doable and I am
tempted to do it this way. The only other
option I could come up with was to have a representation of "everything", which
would in my case be large (10^8) but
finite. Then I could construct a List or a Set at the very end, as [x |
x<-everything, p x] without having explicit sets
in the intermediate steps.
I cannot see any other option, but I thought I better ask.
------------------------------
Message: 2
Date: Wed, 23 Dec 2015 14:00:47 +0100
From: martin <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] explaining effects
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252
Am 12/15/2015 um 09:55 AM schrieb Alexander Berntsen:
> FWIW, I say "effect" rather than "side effect" when talking about Haskell,
> because in Haskell effects happen when
> you want them, not as an unforeseen side-effect as a result of the complexity
> inherent to the source code.
>
> It is often said that having an effect is "difficult" in Haskell. But really,
> it's just that if you are launching
> missiles in Haskell, *you actually mean to*. It didn't happen because you
> wanted to increment i and then "oops,
> stuff happened".
What is the exact defintion of "effect". Everybody talks about it but I am
certainly unable to give a defintion.
------------------------------
Message: 3
Date: Wed, 23 Dec 2015 14:46:09 +0100
From: Imants Cekusins <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] explaining effects
Message-ID:
<cap1qinzcxbne8qumvb8-wdfnhp8goefhaecde826rnusx0q...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
> 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
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 90, Issue 42
*****************************************