Limits of composite functions