I think you are confusing operator sections. This allows you to partially apply the operator with one of its arguments, so you can have the operators (+4) and (4+) , where 4 is the second and then the first argument + respectively. A more understandable example would be ("Hello" ++) versus (++ "world") , the former adds "Hello" to the beginning of the line, and the latter adds "world" to the end of the line.
This contrasts with the use of prefix operators that only have parsers. In this form, the following equivalents:
> let join = (++) > join "Hello, " "world" "Hello, world" > (++) "Hello, " "world" "Hello, world"
In prefix form, you treat the operator as a normal function and it takes its first and then second arguments in order. In operator sections, it is important which side of the operator the argument is on.
So, in your example, you have a partial application ($ 3) , you can reduce it as
map ($ 3) [(4+), (10*), (^2), sqrt] [($ 3) (4+), ($ 3) (10 *), ($ 3) (^ 2), ($ 3) sqrt] [4 + 3, 10 * 3, 3 ^ 2, sqrt 3] [7.0, 30.0, 9.0, 1.7320508075688772]
source share