
Martin Drautzburg
I frequently get confused over f . g vs f g. I do understand the following
Out of the three choices "f . g", "f g" and "f $ g", only the dot operator has a special meaning. The others are the same thing. Remember the function composition operator from math? It's the circle operator. That's how you should read the dot. In fact, if you use Emacs, you can make it display the dot that way. The haskell-mode has this built in. (f . g) x = f (g x) There is also something interesting to note about application: f $ x = ($) f x ($) f x = f x From that follows: ($) f = f And from that follows: ($) = id Indeed: id :: a -> a ($) :: (a -> b) -> (a -> b) ($) is really just id with a more special type. I hope this helps. =) Greets, Ertugrul -- Not to be or to be and (not to be or to be and (not to be or to be and (not to be or to be and ... that is the list monad.