
Thanks, Brandon,
That's a very clear explanation. I remembered that it's low, but forgot that it's this low.
Maybe it's because of my mis-understanding that in C, infix operators have lower precedence.
Just curious, the following is not allowed in Haskell either for the same reason.
applySkip i f ls = (take i) ls ++ $ f $ drop i ls
I read somewhere that people a couple of hundreds of years ago can manage to express things using ($)-like notation without any parenthesis at all.
Is it possible to define an operator to achieve this which works with infix operators? If so, then ($) and parentheses are then really equivalent.
Best,
Ting
Date: Tue, 19 Jul 2011 02:22:47 -0400
Subject: Re: [Haskell-cafe] question regarding the $ apply operator
From: allbery.b@gmail.com
To: tinlyx@hotmail.com
CC: haskell-cafe@haskell.org
On Tue, Jul 19, 2011 at 02:16, Ting Lei
applySkip i f ls = ((take i) ls ++ f) $ (drop i ls) -- brandon s allbery allbery.b@gmail.com
wandering unix systems administrator (available) (412) 475-9364 vm/sms