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

Re: Left- and right-ness of folds

This page is part of the web mail archives of SRFI 44 from before July 7th, 2015. The new archives for SRFI 44 contain all messages, not just those from before July 7th, 2015.

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