Corrected type signature of compose