The function of the pupil is clearly that of controlling the amount of light entering the eye, and hence the light reflex.