[Haskell] Mixing monadic and non-monadic functions

Bulat Ziganshin bulatz at HotPOP.com
Fri Sep 16 14:40:17 EDT 2005


Hello Udo,

Friday, September 16, 2005, 7:19:49 PM, you wrote:

>> do x <- newIORef 0
>>    y <- newIORef 0
>>    z <- newIORef 0
>>    z := *x + *y   -- translated to { x' <- readIORef x; y' <- readIORef y; writeIORef z (x'+y') }

US> May I humbly suggest you explain what problem you are actually trying to
US> solve here?  I've never felt the need to hide monadic binding behind
US> fancy syntax, defining some combinator was always sufficient.  I mean...
US> if you want C, you know where to find it.  If possible I'd rather not
US> see the same programming "style" in Haskell.

you absolutely true - i need sometimes C and don't think to use it
just to write several lines, such as when i need to compute CRC of
data stream

-- 
Best regards,
 Bulat                            mailto:bulatz at HotPOP.com





More information about the Haskell mailing list