Monadic version of functions for containers (adjustM, updateWithKeyM, etc)

Felipe Lessa felipe.lessa at gmail.com
Mon Sep 27 18:16:16 EDT 2010


On Mon, Sep 27, 2010 at 7:13 PM, Thomas DuBuisson
<thomas.dubuisson at gmail.com> wrote:
>    adjustM f k m == liftM (\x -> insert k x m) (f $ lookup k m )

This suggests that you don't need the Monad constraint, only Functor.

-- 
Felipe.


More information about the Libraries mailing list