- The first data type Func takes two arguments, a and b. The data definition simply encapsulates it inside as Func (a -> b). Here, (a -> b) represents the function type that takes a as an argument and produces a value of type b.
- The function compose simply extracts the functions encapsulated in Func a b and Func b c and composes them with the (.) function.
The function (.) is called function composition, and it is used to compose functions without having to specify. It can be simply defined as (.) g f x = g (f x). Also, note when we use function composition, we do not have to specify an argument to the function. This is called a point-free style of programming. At times, a point-free style may be clearer to understand.