  Most existing algorithms for replicated lists, which are widely used in
collaborative text editors, suffer from a problem: when two users concurrently
insert text at the same position in the document, the merged outcome may
interleave the inserted text passages, resulting in corrupted and potentially
unreadable text. The problem has gone unnoticed for decades, and it affects
both CRDTs and Operational Transformation. This paper defines maximal
non-interleaving, our new correctness property for replicated lists. We
introduce two related CRDT algorithms, Fugue and FugueMax, and prove that
FugueMax satisfies maximal non-interleaving. We also implement our algorithms
and demonstrate that Fugue offers performance comparable to state-of-the-art
CRDT libraries for text editing.
