Douglas Adams is the only author I've come across who has used recursion in fiction.
"in short, all the paraphernalia common to all restaurants where little expense has been spared to give the impression that no expense has been spared."
Philip K Dick also did a kind of recursion in The Man in the High Castle, where in the story there is another story being written, which is basically the different version of the original story.
Michael Ende's The Neverending Story is quite self-referential. Actually, I think there are many examples of recursion in literature. Not that any of it takes away from Douglas Adams' genius.