code: public Tuple3<ReadOnlyStyledDocument<PS, SEG, S>, RichTextChange<PS, SEG, S>, MaterializedListModification<Paragraph<PS, SEG, S>>> replaceParagraph(
              int parIdx, UnaryOperator<Paragraph<PS, SEG, S>> mapper) {
          ensureValidParagraphIndex(parIdx);
          return replace(
                  new BiIndex(parIdx, 0),
                  new BiIndex(parIdx, tree.getLeaf(parIdx).length()),
                  doc -> doc.mapParagraphs(mapper));
      }
docs: Maps the paragraph at the given index by calling {@link #replace(int, int, UnaryOperator)}. Returns
  <ol>
  <li>
  the updated version of this document that includes the replacement,
  </li>
  <li>
  the {@link RichTextChange} that represents the change from this document to the returned one, and
  </li>
  <li>
  the modification used to update an area's list of paragraphs.
  </li>
  </ol>