Benjamin Franksen wrote: > Sure. Your definition of bind (>>=): > ... > applies f to something that it has extracted from m, via deconstructor > unpack, namely a. Thus, your bind implementation must know how to produce > an a from its first argument m.
I still have no idea what you're driving at, but could you explain how
the CPS monad 'extracts' a value from something that's missing something
that's missing a value (if that makes sense at all)?
For reference (newtype constructor elided for clarity):
>type Cont r a = (a -> r) -> r
>instance Monad (Cont r) where
> return a = \k -> k a
> m >>= g = \k -> m (\a -> g a k)
Udo.
--
Streitigkeiten dauerten nie lange, wenn nur eine Seite Unrecht hätte.
-- de la Rochefoucauld
signature.asc
Description: Digital signature
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
