Warning: session_start(): open(/var/lib/php/sessions/sess_cdna2vc9orkqbbhggfrc243pjm, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!752
p {
typeWriterConsole();
L paragraphs = superState();
printNumberedParagraphs(paragraphs);
if (empty(paragraphs)) {
print("Nothing to work with");
ret;
}
L paras = numberParagraphs(paragraphs);
int redundancy = 0;
for (Para p : paras) {
S method = calcOne(paras, p);
if (notNull(method)) {
print(p.index + " = " + method);
++redundancy;
}
}
print("Redundancy: " + redundancy + " / " + l(paras));
}
// returns calculation method if pivot could be calculated from other paragraphs
static S calcOne(L all, Para pivot) {
L rest = listMinus(all, pivot);
for (Para p : rest) {
if (eq(p.text, pivot.text))
ret "copy(" + p.index + ")";
}
null;
}