<br><div class="gmail_quote">On Thu, Jun 19, 2008 at 3:35 AM, Ketil Malde <<a href="mailto:ketil@malde.org">ketil@malde.org</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">jinjing <<a href="mailto:nfjinjing@gmail.com">nfjinjing@gmail.com</a>> writes:<br>
<br>
> Any way here's the code:<br>
<br>
> module Dot where<br>
> import Prelude hiding ( (.) )<br>
<br>
> (.) :: a -> (a -> b) -> b<br>
> a . f = f a<br>
<br>
> infixl 9 .<br>
<br>
</div>Isn't this (roughly?) the same as flip ($)?<br>
<br>
As a side note, may I advise you to use another symbol, and leave the<br>
poor dot alone? Overloading it as a module separator is bad enough.<br>
If you have a keyboard that allows greater-than-ascii input, there are<br>
plenty of options: « » ¡ £ ¥ ł € ® ª...<br>
<div class="Ih2E3d"></div></blockquote><br>Note that there already is a standard symbol for this, (>>>) from Control.Arrow. Well, actually (>>>) is more general than backwards function composition, so maybe making your own symbol is still a good idea while you're learning.<br>
<br>-Brent<br></div><br>