static S[][] wordsMatrix(Collection lines) { LL l = map words(lines); int rows = l(l), cols = maxLength(l); S[][] matrix = new S[rows][cols]; for i to rows: { L words = l.get(i); for j to cols: matrix[i][j] = j < l(words) ? words.get(j) : ""; } ret matrix; }