On Tue, Jul 19, 2011 at 02:16, Ting Lei <[email protected]> wrote: > 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 [email protected] wandering unix systems administrator (available) (412) 475-9364 vm/sms
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
