[Haskell-beginners] f . g or f g or f $ g?
Martin.Drautzburg at web.de
Fri Feb 1 20:42:56 CET 2013
I frequently get confused over f . g vs f g. I do understand the following
g :: a->b
f :: b ->c
f.g :: a->c
is a type error, because then f would have to accept a function (a->b) as its
first parameter, but it only accepts a b.
Is there a way to easily remember when to use f.g and when to use f g without
having to do this type algebra.
More information about the Beginners