The compose function.