
19 Jul
2011
19 Jul
'11
2:22 a.m.
On Tue, Jul 19, 2011 at 02:16, Ting Lei
I have a naive question regarding the basic use of the $ operator, and I am confused why certain times it doesn't seem to work. e.g. The following works:
applySkip i f ls = (take i) ls ++ f (drop i ls)
But the following doesn't:
applySkip i f ls = (take i) ls ++ f $ drop i ls
($) has lower precedence than almost every other operator, so your "doesn't work" translates to
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