In lib/aldor/src/datastruc/
sal_fold.as I see
Fold(T: with): FoldingTransformationCategory(T) with {
...
/: (f: (T,T) -> T, Generator T) -> T;
...
} == add { ... }
That makes, of course, only sense if the generator yields only finitely
many elements.
Would it make sense to introduce FiniteGenerator(T), a domain that
behaves exactly like Generator T, except that it asserts (just by its
name) that it only generates finitely many elements.
The burden to assure finiteness would be on the user, but at least in
the signature it would be visible that the generator has to be finite.
Otherwise, that condition must live in the corresponding documentation.
Ralf