Loop constructor
Constructs a Loop by a closure test and a list of steps.
Implementation
Loop({
required final bool Function() close,
required final List<Step> steps
}) : length = steps.length {
build = (i) {
if (close()) return null;
return steps[i];
};
}