<br><div class="gmail_quote">On 10 October 2010 22:32, Johannes Waldmann <span dir="ltr"><<a href="mailto:waldmann@imn.htwk-leipzig.de">waldmann@imn.htwk-leipzig.de</a>></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're at it - are there standard notations<br>
for "forward" function composition and application?<br>
<br>
I mean instead of h . g . f $ x<br>
I'd sometimes prefer x ? f ? g ? h<br>
but what are the "?"</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't think there exists an operator <font class="Apple-style-span" face="'courier new', monospace">?</font>, such that <font class="Apple-style-span" face="'courier new', monospace">h . g . f $ x</font> is equivalent to <font class="Apple-style-span" face="'courier new', 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="'courier new', monospace">($$) :: a -> (a -> b) -> b</font></div>
</div><div><font class="Apple-style-span" face="'courier new', monospace">($$) = flip ($)</font></div><div><font class="Apple-style-span" face="'courier new', 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="'courier new', monospace">h . g . f $ x</font></div><div><font class="Apple-style-span" face="'courier new', monospace">x $$ f . g . h</font></div>
<div><br></div><div>Cheers,</div><div>Ozgur</div>