[Haskell-cafe] sha1 implementation thats "only" 12 times slower then C

Benja Fallenstein benja.fallenstein at gmail.com
Sun Jul 1 13:12:29 EDT 2007


Hi,

2007/7/1, Bulat Ziganshin <bulat.ziganshin at gmail.com>:
>    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


More information about the Haskell-Cafe mailing list