
22 Jul
2008
22 Jul
'08
8:17 a.m.
On Tue, Jul 22, 2008 at 1:15 AM, Gracjan Polak
Antoine Latter
writes: The function "runIdentity" is found in Control.Monad.Identity in the mtl package.
But still... Identity is a bit special monad. What other monads need full laziness in sequence? As far as I know IO is strict. What about lazy/strict state monad?
A little formal reasoning reveals that sequence1 = sequence2 exactly when (>>=) is strict in its left argument. There are four common monads which are _not_: Identity, Reader, Writer, State (and RWS by extension). Luke