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. Edward _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
