[r6rs-discuss] enum-set-subset? not clear
Llewellyn Pritchard
leppie at wdsl.co.za
Sun Dec 16 08:49:00 EST 2007
Hi
The spec says:
"The enum-set-subset? procedure returns #t if the universe
of enum-set1 is a subset of the universe of enum-set2
(considered as sets of symbols) and every element of
enum-set1 is a member of enum-set2. It returns #f otherwise."
Now the 3rd example returns false.
(enum-set-subset? (c '(red blue)) (c '(red)))
But this contradicts the spec, as I see it it is interpreted as follows:
check that every symbol in
(enum-set->list (enum-set-universe enum-set1))
is in
(enum-set->list (enum-set-universe enum-set2))
Another issue is brought up in the definition of enumset=?.
"...as determined by the
enum-set-subset? procedure. This implies that the universes
of the two sets are equal as sets of symbols, but
does not imply that they are equal as enumeration types."
When different enumeration types are passed to enum-set-subset?,
should it then test whether the universe is a subset or just the enum-set.
Regards
leppie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.r6rs.org/pipermail/r6rs-discuss/attachments/20071216/d9d63c8c/attachment.html
More information about the r6rs-discuss
mailing list