Hi
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
which gives me an error:
The first argument of ($) takes one argument,
but its type `[a0]' has none
In the expression: (take i) ls ++ f $ drop i ls
In an equation for `applySkip':
applySkip i f ls = (take i) ls ++ f $ drop i ls
FYI, I am using GHC 7.0.3 for this.
Thanks in advance for comments.
Ting