More minor issues Bradd W. Szonye (16 Oct 2003 11:31 UTC)
Re: More minor issues scgmille@xxxxxx (16 Oct 2003 17:15 UTC)
Re: More minor issues Bradd W. Szonye (16 Oct 2003 17:18 UTC)

More minor issues Bradd W. Szonye 16 Oct 2003 11:31 UTC

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
state:

    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
    list-contains?.

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
read:

    procedure: *-remove-left![!] * => (VALUES % value)
--
Bradd W. Szonye
http://www.szonye.com/bradd