Tomasz Zielonka | 5 Feb 13:52
Picon

Re: Re: Why is $ right associative instead of left associative?

On Sun, Feb 05, 2006 at 02:27:45AM +0000, Ben Rudiak-Gould wrote:
> No one has mentioned yet that it's easy to change the associativity of $ 
> within a module in Haskell 98:
> 
>     import Prelude hiding (($))
> 
>     infixl 0 $
>     f$x = f x
> 
> or, for the purists,
> 
>     import Prelude hiding (($))
>     import qualified Prelude (($))
> 
>     infixl 0 $
>     ($) = (Prelude.$)

But that would break Copy & Paste between modules! ;-)

Best regards
Tomasz

--

-- 
I am searching for programmers who are good at least in
(Haskell || ML) && (Linux || FreeBSD || math)
for work in Warsaw, Poland

Gmane