<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Thank you for the references. I like the term 'bind2'. I had a
look at Prelude.Generalized. Wow!</p>
<p>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</p>
<pre><span class="hs-varid">bind2</span> <span class="hs-keyglyph">=</span> <span class="hs-varid">join</span> <span class="hs-varop">.::</span> <span class="hs-varid">liftM2</span><span class="hs-layout">;
</span><meta http-equiv="content-type" content="text/html; charset=UTF-8"><span class="hs-comment">(.::) = (.) . (.) . (.)
</span></pre><div class="moz-cite-prefix">Am 20.05.16 um 04:50 schrieb Silent Leaf:
</div><blockquote cite="mid:CAGFccjPX9Cao9SrY6rKFk8aq+Te2DTxgFCHykqEoYKMso1X3oQ@mail.gmail.com" type="cite"><div dir="ltr">The interesting bit is, the following function
> \φ ma mb -> join (pure φ <*> ma <*> mb)
which i like to write as follows using ((&) = flip ($)) [infixl 1]
> \φ ma mb -> pure φ <*> ma <*> mb & join
(but it's just personal taste) is very similar to (=<<), aka (flip (>>=)) except the first argument (here φ) has type (a -> b -> m c) instead of (a -> m b), and of course the lambda above takes an added argument too (mb). Some could call it "bind2" (even if it's the flipped version of (>>=) that is being generalized), and well, some do. For those interested, there are several options are available to import it (along possibly with some of its siblings), from several libraries. (List possibly non exhaustive.)
<a moz-do-not-send="true" href="http://hackage.haskell.org/package/prelude-generalize-0.4/docs/Prelude-Generalize.html#v:bind2" target="_blank">http://hackage.haskell.org/package/prelude-generalize-0.4/docs/Prelude-Generalize.html#v:bind2</a>
<a moz-do-not-send="true" href="http://hackage.haskell.org/package/SimpleH-1.2/docs/Algebra-Monad.html#v:bind2" target="_blank">http://hackage.haskell.org/package/SimpleH-1.2/docs/Algebra-Monad.html#v:bind2</a>
<a moz-do-not-send="true" href="http://hackage.haskell.org/package/definitive-base-2.3/docs/Algebra-Monad-Base.html#v:bind2" target="_blank">http://hackage.haskell.org/package/definitive-base-2.3/docs/Algebra-Monad-Base.html#v:bind2</a>
your problem become btw then:
> doIt = bind2 update a b
</div>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre wrap="">_______________________________________________
Beginners mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Beginners@haskell.org">Beginners@haskell.org</a>
<a class="moz-txt-link-freetext" href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a>
</pre>
</blockquote>
</body></html>