enumeration bugs
Bug #227072 reported by
Michael D. Adams
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ikarus Scheme |
Fix Committed
|
Low
|
Abdulaziz Ghuloum |
Bug Description
I believe these functions are non-conforming to the R6RS spec.
> (import (rnrs))
> (enum-set-universe (make-enumeration '(a b a)))
(a b a) ;; should return an object of type enum-set
> (enum-set->list (make-enumeration '(a b a)))
(a b a) ;; should remove duplicates (It's a set not a multi-set)
> (enum-set->list ((enum-
(a a b) ;; should remove duplicates
Related branches
Changed in ikarus: | |
milestone: | none → 0.0.4 |
To post a comment you must log in.
On May 5, 2008, at 5:13 PM, Michael D. Adams wrote:
> Public bug reported:
>
> I believe these functions are non-conforming to the R6RS spec.
>
>> (import (rnrs))
>> (enum-set-universe (make-enumeration '(a b a)))
> (a b a) ;; should return an object of type enum-set
Yes, but the type enum-set is not defined (there is no enum-set?
predicate), and it does not have to be disjoint from other types. It
is possible that I missed a detail somewhere. Pointer?
>> (enum-set->list (make-enumeration '(a b a)))
> (a b a) ;; should remove duplicates (It's a set not a multi-set)
Who should remove the duplicates? make-enumeration or enum-set-
>list? Enumerations are ordered, right? Which "a" should be
removed, the first or the last? Is that specified anywhere?
Maybe it's an error to pass make-enumeration a list of symbols with
duplicates, but I do not see that in the specification of make-
enumeration (all it says is that the argument must be a *list* of
symbols).
In all honesty, I don't understand the purpose of this library, never
used it for anything, and do not see it useful for anything. Maybe
if I understand it better, I could see how it should be implemented
and what reasonable constraints are implicitly there, maybe then I
can do a better job with it. So, do you have a good use/explanation
of this library beyond what's in the 1 page of the spec?
Aziz,,,