Most of the time when two people write a book, one person is doing the majority of the writing and the other is critiquing or helping with the plot or providing technical information that the real writer lacks. Other times the writing is "traded," where some chapters/characters/places are written by one person and others by the other person.
But what I've been doing for the past several years is literally "pair writing," in the sense of pair programming (a more common phenomenon that occurs when two people work on the same piece of code at the same time). I'll meet with the other author and we'll write the same document at the same time, and of course we discuss it as we go. Originally this was done with two keyboards connected to the same computer, but we've now moved to Google Docs and Skype, which allows us to work remotely.
I've never heard of anyone doing this before. It's really hard to attribute specific things in the book to any single person. Sometimes there'll be a pithy line here or there that I can definitely say "That was mine!" or "That was his!", but it's fairly rare. Each of us has literally touched almost every sentence.
And now we're hitting the final stretch of writing (our third major revision; we are both perfectionists), and I have to wonder if this has been done before, and if so, was it successful? Are there any examples of work that has been written in the fashion I've described?