After playing around with haskell a bit I stumbled over this function:
Prelude Data.Maclaurin> :t ((+) . ($) . (+))
((+) . ($) . (+)) :: (Num a) => a -> (a -> a) -> a -> a
(Data.Maclaurin is exported by the package vector-space.) So it takes a Num, a function, another Num and ultimately returns a Num. What magic makes the following work?
Prelude Data.Maclaurin> ((+) . ($) . (+)) 1 2 3
6
2 is obviously not a function (a->a) or did I miss out on something?