On 05/24/2014 08:49 PM, Gautier DI FOLCO wrote:State f `ap1` State g = State $ \x -> let (a, b) = g x in let (c, d) = f
>
> J'ai tenté ça :
> runState (pure (-) <*> pure 4 <*> pure 2) 7
b in (c a, d)State f `ap2` State g = State $ \x -> let (c, d) = f x in let (a, b) = g
d in (c a, b)*Xxxx> runState (pure (,) `ap2` put 4 `ap2` put 7) 0
(((),()),7)
*Xxxx> runState (pure (,) `ap1` put 4 `ap1` put 7) 0
(((),()),4)
_______________________________________________
Haskell-fr mailing list
Haskell-fr@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-fr