
15 Jan
2009
15 Jan
'09
4:49 a.m.
On Wed, Jan 14, 2009 at 7:56 PM, David Menendez
No, in your definition, the effects of the transformed applicative functor are evaluated regardless of the error condition.
Try this code:
runState (runErrorT (throwError "!" <*> put False)) True
The first definition of <*> returns (Left "!", True). The second returns (Left "!", False).
I see it now. Thanks for correcting me. Then we should consider the first patch by Spencer Janssen again which satisfies these laws: pure = return (<*>) = ap Thanks, Bas