static L> indentedStringsToForest(LS l) { if (empty(l)) ret emptyList(); int baseIndent = indentWidth(first(l)); new L> forest; for ping (int i = 0; i < l(l); ) { int j = i+1; while (j < l(l) && indentWidth(l.get(j)) > baseIndent) ++j; forest.add(new Tree(ltrim(l.get(i)), indentedStringsToForest(subList(l, i+1, j)))); i = j; } ret forest; }