
Robert Heinlein’s 1959 short story “–All You Zombies–“ accomplishes a kind of narrative hat trick: All the major characters turn out to be the same person, who takes on different roles through time travel and sex reassignment. The main character is his own partner, mother, father, and child.
Though it contains a number of paradoxes, Princeton philosopher David Lewis judged it to be a “perfectly consistent” time travel story. Ironically, Heinlein had written it in a single day.