[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Left- and right-ness of folds

Bradd wrote:
>> That's a big pitfall! A right-fold on an infinite sequence will
>> diverge before the folding function ever gets called. I think it's a
>> bad idea to provide an interface that is "broken by design" like that
>> -- it cannot possibly function correctly.

scgmille@xxxxxxxxxxxxxxxxxx wrote:
> Its not really.  collection-fold-right will raise an error if applied
> to an infinite collection.  Would it placate you if it was required to
> raise an error with truely infinite collections?

That's better, but I still have a problem with the fact that you're
requiring something that is not well-defined. And by "not well-defined,"
I don't mean that it's ambiguous or unclear -- I mean that there's no
way to define it meaningfully.
Bradd W. Szonye