implement them from the spec.
generator-any is defined to return #t when any of the item satisfy the predicate,
but srfi-1's any returns the true value the predicate returns. Using non-boolean
return value of any is common pattern, so I suggest generator-any be do the same.
It also applies generator-every; srfi-1 returns the last return value of predicate
if all the previous application yields true value. (Though I see using non-boolean
return value of every is less common than any).
Wordings may be tweaked a bit. My shot:
generator-any pred gen
Applies pred on each item from generator gen. As soon as it yields a true value,
the value is returned without consuming the rest of gen. If gen is exhausted,
returns #f.
generator-every pred gen
Applies pred on each item from generator gen. As soon as it yields #f, the procedure
returns #f without consuming the rest of gen. If gen is exhausted, the last value
returned from pred is returned.
- I'll send pull req for reference implementation change.