[Haskell-cafe] Infinite lists in real world programs

Edward Z. Yang ezyang at MIT.EDU
Wed Dec 15 19:40:47 CET 2010

Excerpts from Yves Parès's message of Wed Dec 15 13:28:11 -0500 2010:
> > if one day you decide you need an agent that generates random numbers
> I could say that my agents now run in a certain monad, I just would have to
> transform my basic agents to :
> agent1 = liftM . fmap (*2)
> (or even agen1 = fmap . fmap (*2), however it is less readable IMO)

Yes, it's one of the really great things about Haskell. :-)  But since
implementing functionality takes so much less code in Haskell than
in many other languages, don't be shy to rewrite as necessary.


More information about the Haskell-Cafe mailing list