
15 Dec
2010
15 Dec
'10
2:20 p.m.
On 15 Dec 2010, at 14:15, Guofeng Zhang wrote:
What does "$" mean in Left $ A x. Why does not write it as "Left A x"?
For putStrLn $ "welcome", is the "$" has the same meaning as that in Left $ A x?
It's an infix operator that does nothing but applies the thing on the left to the thing on the right. The reason it's needed is because Left A x would be parsed as (Left applied to A) applied to x, wheras what we want is Left applied to (A applied to x). This can also be done with parentheses, but is often nicer done with $. Bob