On Fri, Dec 05, 2008 at 06:56:46PM +0100, Thomas Davie wrote:
> Which reminds me ofc, that there is a valid applicative for states  
> (assuming the monad instance is valid):
>
> instance Applicative (StateT s f) where
>   pure = return
>   (<*>) = ap
>
> All monads are also applicatives ;)

Sure, as long as you add the assumption Monad f.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to