On Thu, Nov 04, 2004 at 08:03:56AM +0100, Tomasz Zielonka wrote:
> How about this?
> 
>   let a' = addToFM_C (+) a x 1 in
>       maybe () (`seq` ()) (lookupFM a' x) `seq` a'
> 
> It worked for me.

Of course, it is quite inefficient. If you care about constant factors,
better use a FiniteMap with strict operations, like Hal's.

Best regards,
Tomasz

-- 
.signature: Too many levels of symbolic links
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to