The adaptive function of dreaming.