Algorithm APPLYF.