patch applied (haskell-prime-status): add ""Make $ left
associative, like application"
Jason McCarty
jmccarty at sent.com
Wed Apr 23 19:10:48 EDT 2008
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 <jmccarty at sent.com>
More information about the Haskell-prime
mailing list