[Haskell-cafe] Re: Why is $ right associative instead of left associative?

Ben Rudiak-Gould Benjamin.Rudiak-Gould at cl.cam.ac.uk
Sat Feb 4 21:27:45 EST 2006


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.$)

-- Ben



More information about the Haskell-Cafe mailing list