Brian Hulley wrote:
   q >>= (\x -> p)
For example with the State monad, (q) must be some expression which
evaluates to something of the form S fq where fq is a function with
type s -> (a,s), and similarly, (\x -> p) must have type a ->S ( s ->
(a,s)). If we choose names for these values which describe the types
we have:
   q = S s_as
   p = a_S_s_as

Sorry I meant:

     (\x -> p) = a_S_s_as

('p' and 'q' stand for arbitrary expressions that evaluate to monadic values)

Regards, Brian.
--
Logic empowers us and Love gives us purpose.
Yet still phantoms restless for eras long past,
congealed in the present in unthought forms,
strive mightily unseen to destroy us.

http://www.metamilk.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to