You are right, but I was using "extraction" in a rather non-technical
sense.
Look at it this way: we have 'x >>= f', let's assume it's the
continuation monad. Assuming f has type 'a -> C b' we must have
something of type a to be able to call the function be at all.
Somehow >>= is able make s
Lennart Augustsson wrote:
> Well, bind is extracting an 'a'. I clearly see a '\ a -> ...'; it
> getting an 'a' so it can give that to g. Granted, the extraction is
> very convoluted, but it's there.
Oh, that can be remedied...
> m >>= g = m . flip g
In fact, why even mention m?
> (>>=) =
Am Sonntag, 3. September 2006 15:39 schrieb Lennart Augustsson:
> Well, bind is extracting an 'a'. I clearly see a '\ a -> ...'; it
> getting an 'a' so it can give that to g. Granted, the extraction is
> very convoluted, but it's there.
>
> -- Lennart
But
instance Monad (Cont r) where
Well, bind is extracting an 'a'. I clearly see a '\ a -> ...'; it
getting an 'a' so it can give that to g. Granted, the extraction is
very convoluted, but it's there.
-- Lennart
On Sep 2, 2006, at 19:44 , Udo Stenzel wrote:
Benjamin Franksen wrote:
Sure. Your definition of bind
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,
Il Sun, Sep 03, 2006 at 12:26:25AM +0200, Tomasz Zielonka ebbe a scrivere:
> On Sat, Sep 02, 2006 at 09:51:26PM +0200, Benjamin Franksen wrote:
> > However, in order to 'run' (i.e. finally actually use) a monadic value
> > that involves an application of bind, the latter would have to supply
> > so
On Sat, Sep 02, 2006 at 09:51:26PM +0200, Benjamin Franksen wrote:
> However, in order to 'run' (i.e. finally actually use) a monadic value
> that involves an application of bind, the latter would have to supply
> some argument to its second argument (which is a function),
If I didn't see above, o
Andrea Rossato wrote:
> Il Fri, Sep 01, 2006 at 07:22:02AM +0200, Tomasz Zielonka ebbe a scrivere:
>> On Fri, Sep 01, 2006 at 01:13:14AM +0200, Benjamin Franksen wrote:
>> > So getting the value out of the monad is not a pure function (extract
>> > :: Monad m => m a -> a). I think I stated that, al