"Dreams are not without sense, nor are they best understood to be expressions of infantile wishes. They are the result of the interconnectedness of new experience with that already stored in memory networks. But memory is never a precise duplicate of the original; instead, it is a continuing act of creation. Dream images are the product of that creation. They are formed by pattern recognition between some current emotionally valued experience matching the condensed representation of similarly toned memories. Networks of these become our familiar style of thinking, which gives our behavior continuity and us a coherent sense of who we are. Thus, dream dimensions are elements of the schemas, and both represent accumulated experience and serve to filter and evaluate the new day’s input."
Rosalind D. Cartwright's The Twenty-four Hour Mind: The Role of Sleep and Dreaming in Our Emotional Lives