
On Thu, Dec 22, 2005 at 02:02:56PM +0000, Daniel Carrera wrote:
Paul Moore wrote:
As I say, I'm not trying to criticize anyone here, but it seems to be quite hard to get across to people who have understood and assimilated this sort of stuff, just how hard it feels to newcomers. We understand the explanations (we do! really! :-)) but even understanding them, we are still left with a lack of confidence. It's like being shown a full set of carpentry tools, having every one explained, but still reaching for the hammer every time and banging something no matter what we're trying to do :-)
I had never heard of mapM, or other -M functions. I can't imagine why those would be needed. It seems like pointless duplication.
The point of mapM is that you can use side-effects for each element processed. For example, with mapM in IO monad you can turn a list of filenames into a list of file contents. Actually, it is map that is redundant, because it's equivalent to mapM for the Identity monad. Best regards Tomasz -- I am searching for a programmer who is good at least in some of [Haskell, ML, C++, Linux, FreeBSD, math] for work in Warsaw, Poland