<saml> @pl myFunc f (a,b) (c,d) = (f a c, f b d)<br><lambdabot> myFunc = (`ap` snd) . (. fst) . flip flip snd . ((flip . (ap .)) .) . flip flip fst . ((flip . ((.) .)) .) . (flip =<< (((.) . flip . (((.) . (,)) .)) .))<br>
<br><div class="gmail_quote">why not use zipWith?<br><br>[a,b] `g` [c,d] where g = zipWith f <br><br>2009/1/16 Andrew Wagner <span dir="ltr"><<a href="mailto:wagner.andrew@gmail.com">wagner.andrew@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I've been playing around with this, but haven't been able to come up with anything.<div>
<br></div><div>myFunc f (a,b) (c,d) = (f a c, f b d)</div><div><br></div><div>It feels as if there should be a nice simple version of this using some combination of {un,}curry, "on", &&&, ***, or something else.</div>
<div><br></div><div>Any thoughts?</div>
<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>
<br></blockquote></div><br>