The function of mental processes is to mediate between the needs of the organism and the demands of the environment.