I wonder if pattern matching could be less verbose. Maybe this sounds weird, but here is example of what I mean:<br clear="all"><br>&gt; type A = (Int, String)<br>&gt;<br>&gt; f :: String -&gt; A -&gt; A<br>&gt; f s (i,s&#39;) = (i, s ++ s&#39;)<br>
&gt;<br>&gt; data B = B Int String deriving Show<br>&gt;<br>&gt;g :: String -&gt; B -&gt; B<br>&gt;g s (B i s&#39;) = B i $ s ++ s&#39;<br><br>Types A/B and functions f/g are quite similar: (x :: A) or (x :: B) means that x contains some integer and string values, and f/g functions take some string and prepend it to the string part of x. The code for f and g has the same level of verbosity, but -- ta-dah! -- we can use arrows and define f in a highly laconic manner:<br>
<br>&gt; import Control.Arrow<br>&gt; f&#39; :: String -&gt; A -&gt; A<br>&gt; f&#39; = second . (++)<br><br>So my queastion is how I could define (g&#39; :: String -&gt; B -&gt; B) in the same way.<br>