<p dir="ltr">Thanks Ertugrul. In the meantime I noticed that split and unsplit are also missing. Is there a similar replacement for them?</p>
<p dir="ltr">Adrian.<br>
</p>
<div class="gmail_quote">On 5 Jun 2013 12:57, &quot;Ertugrul Söylemez&quot; &lt;<a href="mailto:es@ertes.de">es@ertes.de</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Adrian May &lt;<a href="mailto:adrian.alexander.may@gmail.com">adrian.alexander.may@gmail.com</a>&gt; wrote:<br>
<br>
&gt; I just banged up against this problem:<br>
&gt;<br>
&gt; <a href="http://haskell.1045720.n5.nabble.com/The-case-of-the-missing-Arrow-function-td3125388.html" target="_blank">http://haskell.1045720.n5.nabble.com/The-case-of-the-missing-Arrow-function-td3125388.html</a><br>

&gt;<br>
&gt; Was liftA2 (not the applicative one) a bad idea, or is there another<br>
&gt; way to do it, or what?<br>
<br>
That liftA2 (let me call it liftA2&#39;) likely has this type signature:<br>
<br>
    liftA2&#39; :: (Arrow cat)<br>
               =&gt; (b -&gt; c -&gt; d)<br>
               -&gt; cat a b<br>
               -&gt; cat a c<br>
               -&gt; cat a d<br>
<br>
Does this sound familiar?  You can write this function in terms of the<br>
arrow combinators:<br>
<br>
    liftA2&#39; f c d = arr (uncurry f) . (c &amp;&amp;&amp; d)<br>
<br>
However, if your arrow is also a family of applicative functors<br>
(i.e. pretty much always),<br>
<br>
    instance Applicative (MyArrow a)<br>
<br>
then it&#39;s probably a bad idea, because you really want to use the<br>
cleaner liftA2 instead:<br>
<br>
    liftA2 :: (Applicative f)<br>
              =&gt; (a -&gt; b -&gt; c)<br>
              -&gt; f a<br>
              -&gt; f b<br>
              -&gt; f c<br>
<br>
<br>
Greets,<br>
Ertugrul<br>
<br>
--<br>
Not to be or to be and (not to be or to be and (not to be or to be and<br>
(not to be or to be and ... that is the list monad.<br>
<br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
<br></blockquote></div>