DDC compiler and effects; better than Haskell? (was Re: [Haskell-cafe] unsafeDestructiveAssign?)

Ben Lippmeier Ben.Lippmeier at anu.edu.au
Thu Aug 13 00:10:01 EDT 2009

Dan Doel wrote:
> On Wednesday 12 August 2009 11:46:29 pm Ben Lippmeier wrote:
>> Dan Doel wrote:
>>> Off hand, I'd say I don't write foo and fooM versions of functions much
>>> in actual programs, either. Such duplication goes into libraries...
>> It would be ok if the duplication /was/ actually in the libraries,
>> but often it's not.
>> Note the lack of Data.Map.mapM and Data.Map.foldM. Want to apply a monadic
>> computation to all the elements of a Data.Map? Convert it to a list and
>> back..
> Or use Data.Traversable.mapM and Data.Foldable.foldM.
Ah thanks, I didn't notice the Traversable instance. There are
other higher-order functions in Data.Map that don't seem to have
monadic counterparts though, like insertWith, unionsWith, updateAt ...


More information about the Haskell-Cafe mailing list