[Haskell-cafe] mapM is supralinear?
Ertugrul Soeylemez
es at ertes.de
Fri Sep 9 10:12:19 CEST 2011
Roman Cheplyaka <roma at ro-che.info> wrote:
> > In general it's a bad idea to use mapM over IO.
>
> Could you explain why?
Most applications don't require loading the entire result into memory,
so a combinator like foldM is more appropriate. You should use mapM
over IO only, when the list is short, or when there is really no way
around loading everything into memory.
Greets,
Ertugrul
--
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/
More information about the Haskell-Cafe
mailing list