I am reading this tutorial on Haskell. They define function composition as the following:
(.) :: (b->c) -> (a->b) -> (a-
This example is contrived, but suppose we have
sqr x = x * x inc x = x + 1
and we want to write a function that computes x^2+1. We can write
xSquaredPlusOne = inc . sqr
(which means
xSquaredPlusOne x = (inc . sqr) x
which means
xSquaredPlusOne x = inc(sqr x)
since f=inc and g=sqr).