List<LineFragment> (@NotNull List<LineFragment> oldFragments) { if (oldFragments.isEmpty()) return oldFragments; final List<LineFragment> newFragments = new ArrayList<>(); processAdjoining(oldFragments, fragments -> newFragments.add(doSquash(fragments))); return newFragments; }