private static function generateList($maximum, callable $growth)
{
$sizes = [];
for ($x = 0; $x <= $maximum; $x++) {
$candidateSize = call_user_func($growth, $x);
if ($candidateSize <= $maximum) {
$sizes[] = $candidateSize;
} else {
break;
}
}
return new self($sizes);
}