// ==================================================
// > PART 1
// ==================================================
$counts = $input->lines->map(function ($line) {
return [
$line->length(),
strlen($line->eval())
];
});
$solution_1 = $counts->column(0)->sum() - $counts->column(1)->sum();
// ==================================================
// > PART 2
// ==================================================
$counts = $input->lines->map(function ($line) {
return [
$line->length(),
strlen(addslashes((string) $line)) + 2
];
});
$solution_2 = $counts->column(1)->sum() - $counts->column(0)->sum();