<br><div class="gmail_quote">On 10 October 2010 22:32, Johannes Waldmann <span dir="ltr">&lt;<a href="mailto:waldmann@imn.htwk-leipzig.de">waldmann@imn.htwk-leipzig.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":17y">Oh, and while we&#39;re at it - are there standard notations<br>
for &quot;forward&quot; function composition and application?<br>
<br>
I mean instead of      h . g . f $ x<br>
I&#39;d sometimes prefer   x ? f ? g ? h<br>
but what are the &quot;?&quot;</div></blockquote></div><div><br></div><div>While asking you use the same symbol for function composition, and something like inverse function application. I don&#39;t think there exists an operator <font class="Apple-style-span" face="&#39;courier new&#39;, monospace">?</font>, such that <font class="Apple-style-span" face="&#39;courier new&#39;, monospace">h . g . f $ x</font> is equivalent to <font class="Apple-style-span" face="&#39;courier new&#39;, monospace">x ? f ? g ? h</font>.</div>
<div><br></div><div>But you can simply define an inverse function application like the following and have a close enough alternative,</div><div><br></div><div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">($$) :: a -&gt; (a -&gt; b) -&gt; b</font></div>
</div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">($$) = flip ($)</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">infixl 5 $$</font></div><div><br></div>
<div>Now the following two expression are identical, I suppose:</div><div><br></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">h . g . f $  x</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">x $$ f . g . h</font></div>
<div><br></div><div>Cheers,</div><div>Ozgur</div>