Bryan O'Sullivan wrote:
> Udo Stenzel wrote:
> 
> >There is another bug of this sort in your code.  Consider
> >
> >>        incWordCount w m = M.insertWith (+) w 1 m
> >
> >There is no reason to evaluate the sum inside the map, instead an
> >unevaluated thunk is put in there.
> 
> Would not Data.Map.insertWith' do the trick?

Oops, you're right, this is a fairly recent addition.  


-Udo
-- 
Walk softly and carry a BFG-9000.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to