[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
More minor issues
The explanation of * and % is confusing. The SRFI states:
When * is encountered in the definitions below, it is implied that
the asterisk is replaced with a function for the specific collection
and each of the collection's supertypes for which the procedure is
defined. For example, if we had a 'list' flexible sequence
collection, the functions list-contains?,
flexible-sequence-contains?, sequence-contains?, bag-contains? must
all exist, but collection-contains? does not.
But the *-methods seem to be defined for the supertype, not the subtype.
Given that, the above explanation is confusing. Wouldn't it be better to
When * is encountered in the definitions below, it means that the
function exists for the named collection and all of its subtypes.
For example, all bags and subtypes of bag have a *-contains?
function: bag-contains?, sequence-contains?, and even
Also, I'm not sure whether these functions are supposed to be
polymorphic. I think they are, but the SRFI isn't entirely clear. If so,
please clarify; for example:
Each *-function may be applied to the specific type named or to any
of its subtypes. For example, bag-contains? can find a value in a
sequence, flexible-sequence, or list.
Unrelated to this: The *-remove functions state that they "return two
values." I had to check the reference implementation to confirm that
this means "returns using VALUES." Perhaps the function prototype should
procedure: *-remove-left![!] * => (VALUES % value)
Bradd W. Szonye