Thanks Brent, this should do the trick, although what I was asking was something more general:<div><br></div><div>For "explicitly pass" I meant passing them without the eta reduce, in other terms:</div><div><br></div>
<div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">swapA' :: (Arrow a) => a ((b,c), (b,c)) (c,b)</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">swapA' t = (????) swapFirst >>> swapSecond (???)</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"> where</span></div><div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"> swapFirst = first $ arr snd</span></div>
<div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"> swapSecond = second $ arr fst</span></div><div><br></div><div> where the question marks indicate that I don't know how to tell swapFirst "hey, even though from the outside</div>
<div>I'm passing you a tuple *t*, you have to take as input a (t,t)."</div><div><br></div><div>Hope this is clearer or it has some sense at all, maybe I'm not getting correctly the way arrows work!</div><div>
<br></div><div>bye,</div><div>A.</div><div><br></div><div><br></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Like this?<br>
<br>
swapA' = dup >>> swapFirst >>> swapSecond<br>
where<br>
dup = id &&& id<br>
...<br>
<br>
I'm afraid I'm not confident I really understand your question,<br>
however, so if that doesn't answer it, try asking again!<br>
<br>
-Brent<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br></div>