[Haskell-cafe] A question about State Monad and Monad in general

C K Kashyap ckkashyap at gmail.com
Thu Jul 15 13:19:47 EDT 2010


Thanks Daniel,

Better refactorability.
> If you're using monadic style, changing from, say,
> State Thing
> to
> StateT Thing OtherMonad
>
> or from
> StateT Thing FirstMonad
> to
> StateT Thing SecondMonad
>
> typically requires only few changes. Explicit state-passing usually
> requires more changes.
>

So, performance gain (runtime/memory) is not a side effect of Monadic style
right?


> Yes. If you write to a mutable array, you really write to the memory
> location without extra copying.
>
>
How's this done? Can it be done in Haskell without FFI?

-- 
Regards,
Kashyap
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100715/6d10a111/attachment.html


More information about the Haskell-Cafe mailing list