Niklas Broberg wrote:
> ...
> It should be said though that changing the associativity of $ doesn't
> make all code nice and clean. Consider for instance
> 
> f (g (h x)) (k y)
> 
> We could change that into one of
> 
> f $ g (h x) $ k y
> f (g $ h x) $ k y
> 

If $ is left-associative, then

f (g (h x)) (k y) = (f . g . h $ x) (k y)
                  = (f . g . h $ x) $ k y
                  = f . g . h $ x $ k y

But perhaps composing a curried function this way is unintuitive.

-- 
Jason McCarty <[EMAIL PROTECTED]>
_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime

Reply via email to