so using mseq didn't seem to make any difference, i still had the same
performance.

On 7/1/07, Benja Fallenstein <[EMAIL PROTECTED]> wrote:
Hi,

2007/7/1, Bulat Ziganshin <[EMAIL PROTECTED]>:
>    aa <- unsafeRead a5 0
>    return $! aa
>    bb <- unsafeRead a5 1
>    return $! bb

If this is a useful pattern, would it make sense to have a function to
encapsulate it?

mseq :: Monad m => m a -> m a
mseq m = m >>= (return $!)

- Benja

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to