A simple function to compose an arbitrary number of functions from right to left.