On Thu, 2008-06-19 at 11:33 +0800, jinjing wrote:
> Hi guys,
> 
> This is my second attempt to learn Haskell :)
> 
> Any way here's the code:
> 
> module Dot where
> import Prelude hiding ( (.) )
> 
> (.) :: a -> (a -> b) -> b
> a . f = f a
> 
> infixl 9 .

Note that if you redefine (.) composition to be backward application
(flip ($)) then nobody will understand your programs. It's also quite
probably that after reading your own code for a while that you'll not
understand the code that everyone else writes either! :-)

If you want an operator like that, I suggest picking some other symbol.


Duncan

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to